ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cce.py
Go to the documentation of this file.
1import numpy as np
2from .loss import LossFunction
3
4
6 """
7 Categorical Cross-Entropy Loss Function with reduction type.
8 """
9 def __init__(self, reduction="mean"):
10 """
11 Initialize the Categorical Cross-Entropy loss function.
12 Args:
13 reduction (str): Reduction type ('mean', 'sum').
14 """
15 super().__init__(reduction)
__init__(self, reduction="mean")
Definition cce.py:9