zaccharieramzi / fastmri-reproducible-benchmark

Try several methods for MRI reconstruction on the fastmri dataset. Home to the XPDNet, runner-up of the 2020 fastMRI challenge.
https://fastmri.org/leaderboards
MIT License
151 stars 50 forks source link

GPU->CPU Memcpy failed #173

Closed Jacksonm75 closed 2 years ago

Jacksonm75 commented 2 years ago

when I run paper_eval.py with cpu, it works but too slow. However, with gpu it reports errors like ‘GPU->CPU Memcpy failed’, how can I handle it?

image

zaccharieramzi commented 2 years ago

Hi @Jacksonm75 ,

Sorry for answering so late and thank you for your interest in this repo. Indeed the eval surely will be slow on CPU.

How big is your GPU's memory? You might be facing a hidden out-of-memory error: https://github.com/tensorflow/tensorflow/issues/8710

One solution, but a bit involved, might be to reduce the batch size by changing these lines:

to use predict instead of predict_on_batch with this time a smaller batch size.

zaccharieramzi commented 2 years ago

Hi @Jacksonm75 ,

Did you manage to fix this issue? If so can we close it?

zaccharieramzi commented 2 years ago

Closing this for clarity, but feel free to reopen if needed.