cfernandezlab / CFL

Tensorflow implementation of our end-to-end model to recover 3D layouts. Also with equirectangular convolutions!
GNU General Public License v3.0
105 stars 18 forks source link

How to use optimizer in Equiconv? #13

Closed FocusK closed 3 years ago

FocusK commented 4 years ago

Hello, Thanks for your great work! In your code, I can't find train.py. My question is how to use optimizer. Because EquiConv is an op that we defined, so how to update it like we can directly use Adam to update tf.nn.conv2D

FocusK commented 4 years ago

(I must explain that I use pytorch, not tensorflow, but I think it's doesn't matter) when we use tf.nn.conv2d, the model.parameters are weight and bias,and Adam or SGD will update these value; but we use EquiConv instead of conv2d, how to update parameters use Adam or SGD

cfernandezlab commented 4 years ago

Hi!

As you can see in our code, and as it's explained in our paper, EquiConvs are built on top of deformable convolutions, that are already implemented like standard convolutions, with their correspondent learnable weights and bias.

If you are using pytorch, you will need to import 'deform_conv2d' from 'torchvision.ops.deform_conv'.

FocusK commented 4 years ago

Hi! When I use EquiConv to train, an error occur: error in deformable_im2col: out of memory, and err = 2, cudaSuccess = 0, have you ever encountered this kind of error. Online solutions are :change to a small model 、small dataset. If you are free (1)Can you tell me the specific machine configuration during your training? GPU…… (2) In your paper, the input of the network is image of 256128. So do you encountered similar errors when using larger images?If not, why image size is designed to be 256128? (3)Can you share train.py with me? I want to use your code to test whether equiconv can run on my computer. Thank you very much for your help during this time.