Spaces:
Running
Running
File size: 265 Bytes
29f689c |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
from torch import nn
class PARSeqLoss(nn.Module):
def __init__(self, **kwargs):
super(PARSeqLoss, self).__init__()
def forward(self, predicts, batch):
# predicts = predicts['res']
loss, _ = predicts
return {'loss': loss}
|