From 3fe69b3869c08dae0bfa895e61fa84295dc41a95 Mon Sep 17 00:00:00 2001 From: kosh Date: Thu, 9 May 2024 12:31:03 +0530 Subject: [PATCH] Clean names in loss.py --- src/loss.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/loss.py b/src/loss.py index f73ad86..4ccd105 100644 --- a/src/loss.py +++ b/src/loss.py @@ -2,7 +2,7 @@ import numpy as np from abc import ABC, abstractmethod -class Loss(ABC): +class LossFunction(ABC): @staticmethod @abstractmethod def __call__(output: np.ndarray, target: np.ndarray) -> float: @@ -14,7 +14,7 @@ class Loss(ABC): """""" -class CrossEntropyLoss(Loss): +class CategoricalCrossEntropyLossFunction(LossFunction): @staticmethod def __call__(output: np.ndarray, target: np.ndarray) -> float: return -np.sum(target * np.log10(output), dtype=np.float32)