ONE - On-device Neural Engine
Loading...
Searching...
No Matches
cce.py
Go to the documentation of this file.
1
from
typing
import
Literal
2
from
.loss
import
LossFunction
3
4
5
class
CategoricalCrossentropy
(
LossFunction
):
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)
onert.experimental.train.losses.cce.CategoricalCrossentropy
Definition
cce.py:5
onert.experimental.train.losses.cce.CategoricalCrossentropy.__init__
None __init__(self, Literal["mean", "sum"] reduction="mean")
Definition
cce.py:9
onert.experimental.train.losses.loss.LossFunction
Definition
loss.py:5
runtime
onert
api
python
onert
experimental
train
losses
cce.py
Generated by
1.9.8