14.5. One-Hot Encode
One hot encoder as computational node.
- class fhez.nn.operations.one_hot_encode.OneHotEncode(length=None)
Encode value in one-hot encoded sparse array.
- backward(gradient: numpy.ndarray)
Map only the gradient of the encoded backward.
- property cost
Get non-cost of this node.
- forward(x: numpy.ndarray)
Encode input to sparse matrix.
- property length
Get length of sparse matrix to be generated.
- property schema
Get marshmallow serialisation schema.
- update()
Do nothing as nothing to update.
- updates()
Do nothing as nothing to update.