pointGAN icon indicating copy to clipboard operation
pointGAN copied to clipboard

trouble converging with EMD

Open pclucas14 opened this issue 7 years ago • 16 comments

Hi,

I was wondering if you had encountered convergence issues when training an point autoencoder with EMD as loss function. I find that using a strictly convolutional decoder (instead of dense layers) leads to degenerate solutions. Did you encounter similar issues ? I found that very weird.

Also, I was getting seg faults with the pytorch wrapper you provided in Pytorch 0.4, so I rewrote one. I checked it against this. and it gave the same results, however something weird might be happening. You can find my wrapper [here] (https://gist.github.com/pclucas14/826c129aea315b02cbde0ec23ceb1068).

Thanks for your open source code btw, It's been a real help for my research.

-Lucas

pclucas14 avatar Jul 24 '18 19:07 pclucas14

Have you try the emd loss when training autoencoder? This can‘t converge. Do you have the same problem?

gaohongfein avatar Aug 05 '18 21:08 gaohongfein

I have not tried in an autoencoding setup yet, will get back to you

pclucas14 avatar Aug 07 '18 15:08 pclucas14

Do you know, why in emd folder test.py file the point has the dimension(1500, 6)?? This means the point has 6 columns. When i try to change the 6 to 3, appear a error. @pclucas14

gaohongfein avatar Aug 26 '18 08:08 gaohongfein

and how to use your emd.py

gaohongfein avatar Aug 26 '18 08:08 gaohongfein

What line are you referring to ?

pclucas14 avatar Aug 26 '18 16:08 pclucas14

dist = EMDModule()

p1 = torch.rand(10,1000,6) p2 = torch.rand(10,1500,6) points1 = Variable(p1,requires_grad = True) points2 = Variable(p2, requires_grad = True)

I don't understand why this is (10, 1000, 6 ). Why it is 6? A point is N * 3.

gaohongfein avatar Aug 26 '18 17:08 gaohongfein

@pclucas14

gaohongfein avatar Aug 28 '18 18:08 gaohongfein

The code you are referring to is not mine unfortunately. My guess is that the EMD loss is still defined for n >=1. However, I'm not sure if the CUDA implementation has support for n != 3

pclucas14 avatar Aug 28 '18 18:08 pclucas14

@pclucas14 have you implement a new code about EMD?

gaohongfein avatar Aug 28 '18 18:08 gaohongfein

I have posted my wrapper for Hao Su's EMD implementation. I have not tested it however.

pclucas14 avatar Aug 28 '18 19:08 pclucas14

@pclucas14 can you give me the link?

gaohongfein avatar Aug 28 '18 19:08 gaohongfein

https://gist.github.com/pclucas14/826c129aea315b02cbde0ec23ceb1068. Please let me know if it works for you.

pclucas14 avatar Aug 28 '18 19:08 pclucas14

ok thanks.

gaohongfein avatar Aug 28 '18 19:08 gaohongfein

@gaohongfein Did you figure out why 6 is here p1 = torch.rand(10,1000,6)? I also have segmentation error when I use 3 here p1 = torch.rand(10,1000,3) @fxia22 thanks.

RyanCV avatar Nov 13 '18 03:11 RyanCV

@RyanCV the original EMD code was developed for 6D point cloud (xyz + normal), so there is 6. You can set the last 3 dimensions to 0 for xyz only point cloud.

fxia22 avatar Nov 13 '18 03:11 fxia22

@fxia22 For the version of pytorch, in the readme it said pip install http://download.pytorch.org/whl/cu80/torch-0.1.11.post5-cp27-none-linux_x86_64.whl

but it cannot compile emd in pytorch-0.4, any solution? Because I found those two versions of pytorch are very different in many functions.

RyanCV avatar Nov 14 '18 14:11 RyanCV