Files
PINA/pina/loss/weightning_interface.py
Nicola Demo f0d68b34c7 refact
2025-03-19 17:46:33 +01:00

24 lines
528 B
Python

""" Module for Loss Interface """
from abc import ABCMeta, abstractmethod
class weightningInterface(metaclass=ABCMeta):
"""
The ``weightingInterface`` class. TODO
"""
@abstractmethod
def __init__(self, *args, **kwargs):
pass
@abstractmethod
def aggregate(self, losses):
"""
Aggregate the losses.
:param list(torch.Tensor) input: The list
:return: The losses aggregation. It should be a scalar Tensor.
:rtype: torch.Tensor
"""
pass