We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, thanks for your Pytorch implementation of PointNetVLAD. I'm a new learner. When I read the code, I'm confused at PointNetVLAD:
PointNetVlad-Pytorch/models/PointNetVlad.py
Lines 45 to 81 in ff00ff0
According to my view:
activation
a
vlad
Why not the following:
def forward(self, x): x = x.transpose(1, 3).contiguous() x = x.view((-1, self.max_samples, self.feature_size)) # [B,N,C] activation = torch.matmul(x, self.cluster_weights) if self.add_batch_norm: # activation = activation.transpose(1,2).contiguous() activation = activation.view(-1, self.cluster_size) activation = self.bn1(activation) activation = activation.view(-1, self.max_samples, self.cluster_size) # activation = activation.transpose(1,2).contiguous() else: activation = activation + self.cluster_biases activation = self.softmax(activation) activation = activation.view((-1, self.max_samples, self.cluster_size)) a_sum = activation.sum(-2, keepdim=True) a = a_sum * self.cluster_weights2 # [B,C,k] ### ----------------- different------------------- N = x.shape[1] residual = x.unsqueeze(-1).repeat(1,1,1,self.cluster_size) - \ a.unsqueeze(1).repeat(1,N,1,1) # [B,C,N,k] vlad = activation.unsqueeze(2) * residual vlad = torch.sum(vlad, dim=1) # [B,C,k] ### ----------------- different------------------- # intra-normalization and L2 normalize vlad = F.normalize(vlad, dim=1, p=2) vlad = vlad.reshape((-1, self.cluster_size*self.feature_size)) vlad = F.normalize(vlad, dim=1, p=2) # compress into a compact output vlad = torch.matmul(vlad, self.hidden1_weights) vlad = self.bn2(vlad) if self.gating: vlad = self.context_gating(vlad) return vlad
Is there anything wrong with my understanding? Thanks in advance!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, thanks for your Pytorch implementation of PointNetVLAD.
I'm a new learner. When I read the code, I'm confused at PointNetVLAD:
PointNetVlad-Pytorch/models/PointNetVlad.py
Lines 45 to 81 in ff00ff0
According to my view:
activation
at line 59 represents the distribution of each point n belonging to the cluster k. (the weight)a
at line 62 represents the learned clustervlad
at line 68 means? Where is the residuals and the sum of them according to points n?Why not the following:
Is there anything wrong with my understanding?
Thanks in advance!
The text was updated successfully, but these errors were encountered: