Open amirshamaei opened 1 year ago
I made it a bit better as follows:
criterions: List = [torch.nn.MSELoss],
and config file:
criterions:
- _target_: torch.nn.MSELoss
- _target_: torch.nn.MSELoss
and the training step:
for criterion in self.criterions:
loss += criterion(output_imgs, target_img)
I appreciate if you suggest a better approach
Hi, I am working on adopting H+PL template for MRI reconstruction. I need to have several loss functions. What is the best routine for adding them to a PL module?
Currently, I added this piece of code to init(). However, I believe it can be more efficient and general.