Reference

OneHot.OneHotArrayType
OneHotArray

A type to hold a one-hot encoded array efficiently. Implements efficient matrix multiplication.

source
OneHot.argmax_Method
argmax_(A; dims)

Index of maximum elements of A over given dims, dropping the reduced dims.

source
OneHot.decodeMethod
decode(X)

Returns an array A such that OneHot.encode(A, 1:q) == X. Here q = size(X, 1) is interpreted as the number of classes.

source
OneHot.encodeFunction
encode(data, labels)

Returns a one-hot encoded version of data, where classes are indexed according to labels.

source
OneHot.tensormulMethod
tensormul(A, B, dims)

A*B contracting first dims dimensions of A with first dims dimensions of B (which must match). Exploits the fact that some of the tensors are OneHotArray.

source