Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

locally aggregated feature and mask #2

Open
jiangwei221 opened this issue Jan 3, 2019 · 0 comments
Open

locally aggregated feature and mask #2

jiangwei221 opened this issue Jan 3, 2019 · 0 comments

Comments

@jiangwei221
Copy link

Hi:
Thanks for sharing this project!
I'm trying to understand one function:

class VFE(nn.Module):
def __init__(self,cin,cout):
super(VFE, self).__init__()
assert cout % 2 == 0
self.units = cout // 2
self.fcn = FCN(cin,self.units)
def forward(self, x, mask):
# point-wise feauture
pwf = self.fcn(x)
#locally aggregated feature
laf = torch.max(pwf,1)[0].unsqueeze(1).repeat(1,cfg.T,1)
# point-wise concat feature
pwcf = torch.cat((pwf,laf),dim=2)
# apply mask
mask = mask.unsqueeze(2).repeat(1, 1, self.units * 2)
pwcf = pwcf * mask.float()
return pwcf

Especially:

#locally aggregated feature
laf = torch.max(pwf,1)[0].unsqueeze(1).repeat(1,cfg.T,1)

The mask is not used for generating the locally aggregated feature. This may cause the local feature is consisted of (0,0,0) points.

For example, if an input is in shape (B, C, N), where B is the batch size, C is the number of channel, N is the number of the points. And the first half part of N are all negative values, and the second half is empty, which represented as (0,0,0). The locally aggregated feature which in shape (B, C, 1), after max operation should be all zeros, which is wrong I think.

Bests,

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant