API Reference
Step
Implementation of binary step activation.
>>> import torch, torchact >>> m = torchact.nn.Step() >>> input = torch.tensor([1.0, -2.0, 0.0, 3.0]) >>> output = m(input) >>> print(output) tensor([1, 0, 0, 1])