Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

MeanAbsoluteLossLayer

MeanAbsoluteLossLayer[]
represents a loss layer that computes the mean absolute loss between the "Input" port and "Target" port.

Details and OptionsDetails and Options

  • MeanAbsoluteLossLayer[][<|"Input" -> in, "Target"target|>] explicitly computes the output from applying the layer.
  • MeanAbsoluteLossLayer[][<|"Input"->{in1,in2,},"Target"->{target1,target2,}|>] explicitly computes outputs for each of the ini and targeti.
  • MeanAbsoluteLossLayer exposes the following ports for use in NetGraph etc.:
  • "Input"a numeric tensor of arbitrary rank
    "Target"a numeric tensor of the same rank as "Input"
    "Loss"a real number
  • MeanAbsoluteLossLayer is typically used inside NetChain, NetGraph, and NetTrain.
  • When it cannot be inferred from other layers in a larger net, the option "Input"->{n1,n2,} can be used to fix the input dimensions of MeanSquaredLossLayer.

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Create a MeanAbsoluteLossLayer object:

In[1]:=
Click for copyable input
Out[1]=

Apply some data to a mean loss layer:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Create a MeanAbsoluteLossLayer that assumes the input data has dimensions {2}:

In[1]:=
Click for copyable input
Out[1]=

Apply the layer to multiple inputs simultaneously:

In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=
Introduced in 2016
(11.0)