You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ColossalAI/colossalai/nn/loss/base_loss.py

14 lines
220 B

#!/usr/bin/env python
# -*- encoding: utf-8 -*-
from abc import ABC, abstractmethod
class BaseLoss(ABC):
"""Absctract loss class
"""
@abstractmethod
def calc_loss(self, *args, **kwargs):
pass