Files
PINA/pina/loss/weighting_interface.py
2025-03-19 17:48:26 +01:00

25 lines
572 B
Python

"""Module for the Weighting Interface"""
from abc import ABCMeta, abstractmethod
class WeightingInterface(metaclass=ABCMeta):
"""
Abstract base class for all loss weighting schemas. All weighting schemas
should inherit from this class.
"""
def __init__(self):
"""
Initialization of the :class:`WeightingInterface` class.
"""
self.condition_names = None
@abstractmethod
def aggregate(self, losses):
"""
Aggregate the losses.
:param dict losses: The dictionary of losses.
"""