jacinle.nd.shape#
Functions
|
Compute the softmax of the input array at the given axis. |
|
Unsqueeze the numpy array at the given axes. |
|
Unsqueeze the numpy array |
Functions
- softmax(x, axis=-1)[source]#
Compute the softmax of the input array at the given axis.
\[\text{softmax}(x)_i = \frac{e^{x_i}}{\sum_j e^{x_j}}\]
- unsqueeze(x, *axes)[source]#
Unsqueeze the numpy array at the given axes. Similar to the PyTorch’s
torch.unsqueeze()
.