js3611 / Deep-MRI-Reconstruction

Deep Cascade of Convolutional Neural Networks for MR Image Reconstruction: Implementation & Demo
Other
317 stars 103 forks source link

Unnecessary GPU memory usage in PyTorch Implementation #6

Open tinyRattar opened 5 years ago

tinyRattar commented 5 years ago

I noticed that in main_crnn.py, line 167 : validate_err += err as err is a Varaible on GPU, such usage will take extra GPU memory (with PyTorch 1.0.1), maybe you should use err.item() instead like line 147. line 188 has the same problem as well

Alxemade commented 4 years ago

Thanks!