Open jihoon9208 opened 3 years ago
Not sure what you are doing inside the make sparse tensor function, but if you want to force the output to use a specific key, feed the key as an additional argument to convolution/pool etc. https://nvidia.github.io/MinkowskiEngine/convolution.html#MinkowskiEngine.MinkowskiConvolution.forward
Using the coordinate and feature of the results of the sparse convolution, I process "self.gac4(out_C1, out_F1)". The result of this function is a tensor shaped coordinate and feature, which i would like to set in the "out" variable. Is there any way I can do it?
I use this code in resunet.py
out_s8 = self.conv4(out4) out_s8 = self.norm4(out_s8) out_s8 = self.block4(out_s8) out = MEF.relu(out_s8)
out_C1 = out.C * 0.025 out_F1 = out.F gac_C1, gac_F1 = self.gac4(out_C1, out_F1) coord = torch.cat((out.C, gac_C1.T / 0.025), dim=0) feature = torch.cat((out.F, gac_F1.T), dim=0)
out8 = self.make_sparse_tensor(feature, coord, 8 , out.coordinate_map_key, out.coordinate_manager)
but i got this error message SparseTensors must have the same coordinate_map_key.coordinate map key:[8, 8, 8] != coordinate map key:[8, 8, 8]:ncCHr
out_s8 coordinate_map_key:coordinate map key:[8, 8, 8]:ncCHr out8 coordinate_map_key:coordinate map key:[8, 8, 8]
how can i fix it?
Desktop (please complete the following information):