l1loss
Syntax
Description
The L1 loss operation computes the
L1 loss given network predictions and target values. When the
Reduction
option is "sum"
and the
NormalizationFactor
option is "batch-size"
, the
computed value is known as the mean absolute error (MAE).
The l1loss
function calculates the L1 loss
using dlarray
data.
Using dlarray
objects makes working with high
dimensional data easier by allowing you to label the dimensions. For example, you can label
which dimensions correspond to spatial, time, channel, and batch dimensions using the
"S"
, "T"
, "C"
, and
"B"
labels, respectively. For unspecified and other dimensions, use the
"U"
label. For dlarray
object functions that operate
over particular dimensions, you can specify the dimension labels by formatting the
dlarray
object directly, or by using the DataFormat
option.
specifies additional options using one or more name-value arguments. For example,
loss
= l1loss(___,Name=Value
)l1loss(Y,targets,Reduction="none")
computes the
L1 loss without reducing the output to a scalar.
Examples
Input Arguments
Output Arguments
Algorithms
Extended Capabilities
Version History
Introduced in R2021b