Expand description

Implementations of all operations for tensors, including activations, binary operations, and other methods.

Traits

Functions

Applies a DifferentiableFunction to the tensor.

Clamps all values in t to between min and max

Numerically stable computation of log(softmax(t)). Does t - logsumexp(t) under the hood.

Computes the LogSumExp function. Equivalent to Log(sum(exp(data))) or data.exp().sum(-1).log().

Matrix multiplication.

Replaces any nans in t with value.

Negates all values in t.

Computes the softmax function. Equivalent to t.log_softmax().exp() or exp(log_softmax(t)) or exp(t) / sum(exp(t))

Sets t to value anywhere mask equals value

vector * matrix multiplication.