facebookresearch / fastMRI

A large-scale dataset of both raw MRI measurements and clinical MRI images.
https://fastmri.org
MIT License
1.3k stars 372 forks source link

Training the VarNet model fails if the Trainer object has more than 1 logger object #133

Closed ant0nsc closed 3 years ago

ant0nsc commented 3 years ago

I'm trying to train the VarNetModule with a PL Trainer that has two logger objects. This fails in line 116 of mri_module, where the code is accessing the SummaryWriter object in the logger.

self.logger.experiment.add_image(f"{key}/target", target, global_step=self.global_step)

It would be great to have that code a bit more flexible: For example, if the loggers are a list, search for one that is a TensorBoardLoger, and only on those call add_image. Happy to PR that.

mmuckley commented 3 years ago

Closed by PR #134.