ONE - On-device Neural Engine
Loading...
Searching...
No Matches
mse.py
Go to the documentation of this file.
1
from
typing
import
Literal
2
from
.loss
import
LossFunction
3
4
5
class
MeanSquaredError
(
LossFunction
):
6
"""
7
Mean Squared Error (MSE) Loss Function with reduction type.
8
"""
9
def
__init__
(self, reduction: Literal[
"mean"
,
"sum"
] =
"mean"
) ->
None
:
10
"""
11
Initialize the MSE loss function.
12
Args:
13
reduction (str): Reduction type ('mean', 'sum').
14
"""
15
super().
__init__
(reduction)
onert.experimental.train.losses.loss.LossFunction
Definition
loss.py:5
onert.experimental.train.losses.mse.MeanSquaredError
Definition
mse.py:5
onert.experimental.train.losses.mse.MeanSquaredError.__init__
None __init__(self, Literal["mean", "sum"] reduction="mean")
Definition
mse.py:9
runtime
onert
api
python
onert
experimental
train
losses
mse.py
Generated by
1.9.8