Skip to content
New issue

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

"MinkowskiGenerativeConvolutionTranspose" function does not expand coordinates #275

Closed
chrockey opened this issue Dec 13, 2020 · 0 comments

Comments

@chrockey
Copy link
Contributor

chrockey commented Dec 13, 2020

Hi,

I have tried to migrate my code to MinkowskiEngine V0.5.
Following the migration guide, I used ME.MinkowskiGenerativeConvolutionTranspose for a generative trans. conv. but it did not expand new coordinates.
However, ME.MinkowskiConvolutionTranspose with "expand_coordinates=True" did expand new coordinates successfully.
I attached my code.

  5 def test_union_map():                                                                                                                                                                                                                                                                 
  6     device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')                                                                                                                                                                                               
  7                                                                                                                                                                                                                                                                                       
  8     A = ME.SparseTensor(                                                                                                                                                                                                                                                              
  9             features=torch.FloatTensor([                                                                                                                                                                                                                                              
 10                 [1, 1],                                                                                                                                                                                                                                                               
 11                 [1, 1],                                                                                                                                                                                                                                                               
 12                 [1, 1],                                                                                                                                                                                                                                                               
 13                 [1, 1]                                                                                                                                                                                                                                                                
 14             ]),                                                                                                                                                                                                                                                                       
 15             coordinates=torch.IntTensor([                                                                                                                                                                                                                                             
 16                 [0, 0, 0, 1],                                                                                                                                                                                                                                                         
 17                 [0, 0, 1, 0],                                                                                                                                                                                                                                                         
 18                 [0, 0, 2, 0],                                                                                                                                                                                                                                                         
 19                 [0, 0, 3, 0]                                                                                                                                                                                                                                                          
 20             ]),                                                                                                                                                                                                                                                                       
 21             device=device                                                                                                                                                                                                                                                             
 22         )                                                                                                                                                                                                                                                                             
 23                                                                                                                                                                                                                                                                                       
 24     convtr = ME.MinkowskiGenerativeConvolutionTranspose(in_channels=2,                                                                                                                                                                                                                
 25                                                         out_channels=2,                                                                                                                                                                                                               
 26                                                         kernel_size=3,                                                                                                                                                                                                                
 27                                                         stride=1,                                                                                                                                                                                                                     
 28                                                         bias=False,                                                                                                                                                                                                                   
 29                                                         dimension=A.dimension).to(device)                                                                                                                                                                                             
 30                                                                                                                                                                                                                                                                                       
 31     B = convtr(A)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
 32                                                                                                                                                                                                                                                                                       
 33     print('\n', B.C)                                                                                                                                                                                                                                                                    

The output is
Screenshot from 2020-12-13 23-28-10

Using MinkowskiConvolutionTranspose with "expand_coordinates=True", the output is
Screenshot from 2020-12-13 23-30-27

By the way, thanks for your work!

chrischoy added a commit that referenced this issue Dec 14, 2020
chrischoy added a commit that referenced this issue Dec 15, 2020
Tanazzah pushed a commit to Tanazzah/MinkowskiEngine that referenced this issue Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants