pytorch comes with some common loss function, they are torch.nn.Module Subclass. Therefore, custom Loss function also need to inherit the class.
確定! 回上一頁