Module utils

Module utils 

Source
Expand description

Additional utilities for creating, manipulating, and managing tensors and models.

Structs§

Dropout
The Dropout layer is randomly zeroizes inputs with a given probability (p). This regularization technique is often used to prevent overfitting.
PadActionIter
An iterator over the variants of PadAction
Padding

Enums§

PadAction
PadMode

Traits§

DropOut
Dropout randomly zeroizes elements with a given probability (p).
Pad
The Pad trait defines a padding operation for tensors.

Functions§

calculate_pattern_similarity
Calculate similarity between two patterns
clip_gradient
Clip the gradient to a maximum value.
clip_inf_nan
concat_iter
Creates an n-dimensional array from an iterator of n dimensional arrays.
extract_patterns
Extract common patterns from historical sequences
floor_div
divide two values and round down to the nearest integer.
genspace
hstack
stack a 1D array into a 2D array by stacking them horizontally.
inverse
is_similar_pattern
Check if two patterns are similar enough to be considered duplicates
layer_norm
layer_norm_axis
linarr
round_to
Round the given value to the given number of decimal places.
stack_iter
Creates a larger array from an iterator of smaller arrays.
tril
Returns the lower triangular portion of a matrix.
triu
Returns the upper triangular portion of a matrix.
vstack
stack a 1D array into a 2D array by stacking them vertically.