Module utils

Source

Functionsยง

argmax
non-inplace operation: argmax
check_dim_is_legal
check whether the i32 dim (can be either forward or reverse indexing) is legal for max_dim
max
non-inplace operation: max element of the specific dim
mean
non-inplace operation: mean
min
non-inplace operation: min element of the specific dim
relu
max(0.0, x)
sigmoid
1 / (1 + exp(-x))
softmax
inplace operation: softmax the given specific dim
std
following PyTorch, calculate the standard deviation with a specific dim
sum_ndarray
non-inplace operation: sum the given specific dim
tanh
2sigmoid(2x) - 1