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