This commit is contained in:
Nicola Demo
2024-09-09 10:50:54 +02:00
parent 9d9c2aa23e
commit f0d68b34c7
23 changed files with 480 additions and 229 deletions

View File

@@ -0,0 +1,24 @@
""" 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