New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding several loss (criteria) #609
Comments
I made it a bit better as follows: criterions: List = [torch.nn.MSELoss], and config file:
and the training step: for criterion in self.criterions:
loss += criterion(output_imgs, target_img) I appreciate if you suggest a better approach |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The text was updated successfully, but these errors were encountered: