Main Content

L_{1} loss for regression tasks

The L_{1} loss operation computes the
L_{1} 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 L_{1} 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(dlY,targets,Reduction="none")`

computes the
L_{1} loss without reducing the output to a scalar.

`dlarray`

| `dlgradient`

| `dlfeval`

| `softmax`

| `sigmoid`

| `crossentropy`

| `l2loss`

| `huber`

| `mse`

| `ctc`