Skip to content
Snippets Groups Projects
Commit 5663352c authored by Yandi's avatar Yandi
Browse files

[Loss function] Adding the loss function

parent 76367e6f
No related branches found
No related tags found
1 merge request!1Master into main
import torch.nn as nn
class RMSLELoss(nn.Module):
def __init__(self):
super().__init__()
self.mse = nn.MSELoss()
def forward(self, pred, actual):
return torch.sqrt(self.mse(torch.log(pred + 1), torch.log(actual + 1)))
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment