microsoft / O-CNN

O-CNN: Octree-based Convolutional Neural Networks for 3D Shape Analysis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Best way to add Context Vector at bottom of UNet

sguerin13 opened this issue · comments

Hello,

I am looking for a way to concatenate the vector at the bottom of a UNet - octree depth = 0 - with a global context vector before the upsampling portion of the network. I am not clear on the best way to accomplish this. I was looking at the col2octree function or ocnn.octree_update but didn't see a clear example.

You can refer to the O-CNN-based LeNet or ResNet. These networks are used for shape classification, and a global shape feature is produced.

Would you use octree2voxel for a 1D vector? Can I simply concatenate the data at depth 0 and then pass through the octree deconvolution layers?

For example:
data = self.pool(data,octree) # assume data is at depth 0 - shape = (1, 256,1,1)
data = torch.cat((data,context_vector),1) # new tensor shape is (1,512,1,1)
data = self.deconv(data,octree) # octree deconv layer.