PSMNet icon indicating copy to clipboard operation
PSMNet copied to clipboard

Memory of RAM

Open hubery4 opened this issue 3 years ago • 4 comments

Hi JiaRen,

I have met a question that when I run 'finetune.py' in my computer with RAM = 32G. It always will be killed after one epoch. The error is this. image I just use the KITTI_2015 training data for finetune based on pretrained ScenFlow model.

Is the problem that the RAM=32G is not enough? How much the memory of RAM you used during training? Or is there anything in 'finetune.py' I need to change to run in RAM <= 32G?

Thank you

hubery4 avatar Jun 25 '21 15:06 hubery4

Hi, @hubery4 You could reduce the batch size both of trainset and valset. In validation, a pair of KITTI image takes around ~4.xGB memory. It seems that 32GB is not enough for batch size 8 in validation.

JiaRenChang avatar Jun 27 '21 16:06 JiaRenChang

@JiaRenChang Thank you for the suggestion. I have tried batch-size=1, it still had this problem. I also tried in Google Colab. Each time the process will stop after 1 training epoch. image

hubery4 avatar Jun 28 '21 09:06 hubery4

@JiaRenChang Thank you I have figured out this problem. It is the dimension problem of true_disp and pred_disp.

hubery4 avatar Jun 28 '21 10:06 hubery4

@hubery4 Could you explain what you mean by dimension problem? I fixed this already in finetune.py by squeezing the extra dimension in axis=1, but I'm still getting this out of memory error with a 32G gpu. Thanks!

tyleryzhu avatar Sep 13 '21 21:09 tyleryzhu