dqs.torch.layer.SigSoftmax

SigSoftmax layer for PyTorch.

class SigSoftmax()

Tensor Shape

I/O

Shape

Input

(N, M)

Output

(N, M)

N corresponds the batch size.

Example

The following code transforms input tensor x into output tensor y of the same size.

sizes = torch.tensor([4,4], dtype=torch.long)
l = SigSoftmax()
x = torch.randn(128, 10)
y = l(x)