ArminMasoumian / GCNDepth

Self-Supervised CNN-GCN Autoencoder for Monocular Depth Estimation
MIT License
113 stars 17 forks source link

Can't set imgs_per_gpu > 1 while num_gpus = 1 (or workers_per_gpu=1) #4

Closed huynhhoanghuy closed 2 years ago

huynhhoanghuy commented 2 years ago

When I change imgs_per_gpu >1, it raise error in forward function ( y4 = x4.view(10*32,-1) in depth_decoder.py).

ArminMasoumian commented 2 years ago

When I change imgs_per_gpu >1, it raise error in forward function ( y4 = x4.view(10*32,-1) in depth_decoder.py).

The input to fully connected layer expects a single dimension vector so if you want to add more img per gpu, you need to flatten it before passing to a fully connected layer in the forward function.

huynhhoanghuy commented 2 years ago

@ArminMasoumian, if I change the input size (1024x320) to smaller or bigger, the network will raise error: "mat1 and mat2 shapes cannot be multiplied". So, I wonder that, is your network like Yolo v4' model style: "multiple by 32" on image input? Your network has hard fixed-size input, right?

ArminMasoumian commented 2 years ago

@ArminMasoumian, if I change the input size (1024x320) to smaller or bigger, the network will raise error: "mat1 and mat2 shapes cannot be multiplied". So, I wonder that, is your network like Yolo v4' model style: "multiple by 32" on image input? Your network has hard fixed-size input, right?

Yes, if you change the input image size of the encoder, you need to modify the decoder input size as well.

ArminMasoumian commented 2 years ago

I will close this issue, if you have further question, you can reopen it.