"Boolean" (Net Decoder)

NetDecoder["Boolean"]

represents a decoder that converts a probability p to False if p<0.5, and True otherwise.

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 scalar in the range 0input1.
  • NetDecoder[{"Boolean","InputDepth"->n}] can be used to specify that the input tensor has depth n. The default depth is 0, indicating that the input is a single real number.
  • A decoder can be attached to an output port of a net by specifying "port"->NetDecoder[] when constructing the net.

Examples

open allclose all

Basic Examples  (1)

Create a Boolean decoder:

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

Decode a probability as either True or False:

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

The decoder maps over a batch of examples:

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

Scope  (2)

See Also

NetDecoder  NetEncoder  NetChain  NetGraph  True  False

Tutorials

Related NetEncoders

Related NetDecoders