hsokooti / RegNet

Nonrigid image registration using multi-scale 3D convolutional neural networks
Apache License 2.0
192 stars 50 forks source link

Performance issues in functions/registration/multi_stage.py(P2) #15

Open DLPerf opened 3 years ago

DLPerf commented 3 years ago

Hello,I found a performance issue in functions/registration/multi_stage.py , sess = tf.Session() was repeatedly called in for i_stage, stage in enumerate and was not closed. I think it will increase the efficiency and avoid out of memory if you close this session after using it.

Here are two files to support this issue,support1 and support2

Looking forward to your reply. Btw, I am very glad to create a PR to fix it if you are too busy.

hsokooti commented 3 years ago

Hi DLPerf, thank you for your nice suggestion. Please feel free to create a PR to fix this.