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)

SoftmaxLayer

SoftmaxLayer[]
represents a softmax net layer.

Details and OptionsDetails and Options

  • SoftmaxLayer[][input] explicitly computes the output for input.
  • SoftmaxLayer[][{input1,input2,}] explicitly computes outputs for each of the inputi.
  • SoftmaxLayer is typically used inside NetChain, NetGraph, etc.
  • SoftmaxLayer exposes the following ports for use in NetGraph etc.:
  • "Input"a rank-1 numerical tensor
    "Output"a rank-1 numerical tensor
  • When it cannot be inferred from other layers in a larger net, the option "Input"->n can be used to fix the input dimensions of SoftmaxLayer.

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Create a softmax layer:

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

Apply a softmax layer to an input vector:

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

Create a softmax layer with a NetDecoder:

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

Apply the layer to data:

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

Interpret the outputs of the softmax layer as probabilities:

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