"Boolean" (Net Encoder)
NetEncoder["Boolean"]
represents an encoder that converts True to 1 and False to 0.
Details

- NetEncoder[…][input] applies the encoder to an input to produce an output.
- NetEncoder[…][{input1,input2,…}] applies the encoder to a list of inputs to produce a list of outputs.
- The input to the encoder inputi must be either True or False.
- The output of the encoder is 0 if input is False, and 1 if input is True. This is equivalent to Boole[inputi].
- An encoder can be attached to an input port of a net by specifying "port"->NetEncoder[…] when constructing the net.
Examples
open allclose allBasic Examples (1)
Scope (1)
Attach a Boolean encoder to the input port of an ElementwiseLayer: