guopengf / FL-MRCM

Multi-institutional Collaborations for Improving Deep Learning-based Magnetic Resonance Image Reconstruction Using Federated Learning
MIT License
45 stars 10 forks source link

Question of loss_adv_g #10

Closed ddayzzz closed 2 years ago

ddayzzz commented 2 years ago

Thank you for this great work. I noticed that loss_adv_g will not take effect to the back propaganda because it is detached and re-assigned to a float scalar instead of a variable. https://github.com/guopengf/FL-MRCM/blob/14d996cc4ee5d01f7458eb4128e75daf2c9191dc/models/recon_Update.py#L147

Is it correct?

guopengf commented 2 years ago

Hi,

Thanks for pointing out! You are right, detach() should take place in the next line (in the append()). This is a bug when I tried to correct gpu memory leakage in the previous version. I just fxied it.

ddayzzz commented 2 years ago

Hi,

Thanks for pointing out! You are right, detach() should take place in the next line (in the append()). This is a bug when I tried to correct gpu memory leakage in the previous version. I just fxied it.

Thank you for immediate replay. 😉