ONE - On-device Neural Engine
Loading...
Searching...
No Matches
cce.py
Go to the documentation of this file.
1from typing import Literal
2import numpy as np
3from .loss import LossFunction
4
5
7 """
8 Categorical Cross-Entropy Loss Function with reduction type.
9 """
10 def __init__(self, reduction: Literal["mean", "sum"] = "mean") -> None:
11 """
12 Initialize the Categorical Cross-Entropy loss function.
13 Args:
14 reduction (str): Reduction type ('mean', 'sum').
15 """
16 super().__init__(reduction)
None __init__(self, Literal["mean", "sum"] reduction="mean")
Definition cce.py:10