stevenygd / PointFlow

PointFlow : 3D Point Cloud Generation with Continuous Normalizing Flows
https://www.guandaoyang.com/PointFlow/
MIT License
720 stars 101 forks source link

reshape in MovingBatchNormNd? #14

Closed panzhang0212 closed 4 years ago

panzhang0212 commented 4 years ago

https://github.com/stevenygd/PointFlow/blob/33ce21ff8c42e1c58949742999618fc114e25b86/models/normalization.py#L53 the shape: x: 16*2048*3, x.transpose(0, 1): 2048*16*3 x.transpose(0, 1).reshape(num_channels, -1) : 3*32768

should it be x.transpose(1, 2).transpose(0, 1).reshape(num_channels, -1)?

stevenygd commented 4 years ago

The batch normalization layer assum the input is (bs, num_channel) https://github.com/stevenygd/PointFlow/blob/33ce21ff8c42e1c58949742999618fc114e25b86/models/normalization.py#L140

So when inputting into this, we should reshape the tensor input (bs x #points, dim)