import torch.nn as nn from abc import ABC, abstractmethod [docs]class Loss(nn.Module, ABC): def __init__(self): super().__init__() [docs] @abstractmethod def forward(self, *args, **kwargs): ...