"Scalar" (Net Decoder)

NetDecoder["Scalar"]

represents a decoder that converts a length-1 vector to a number.

Details

  • NetDecoder[][input] applies the decoder to an input to produce an output.
  • NetDecoder[][{input1,input2,}] applies the decoder to a list of inputs to produce a list of outputs.
  • The input to the decoder input is a length-1 numeric vector.
  • A decoder can be attached to an output port of a net by specifying "port"->NetDecoder[] when constructing the net.

Examples

Basic Examples  (1)

Create a scalar decoder:

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

Decode a vector of length 1:

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

The decoder maps across a batch of examples:

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

See Also

NetDecoder  NetEncoder  NetChain  NetGraph

Tutorials

Related NetEncoders