[−][src]Crate ndarray_einsum_beta
The ndarray_einsum
crate implements the einsum
function, originally
implemented for numpy by Mark Wiebe and subsequently reimplemented for
other tensor libraries such as Tensorflow and PyTorch. einsum (Einstein summation)
implements general multidimensional tensor contraction. Many linear algebra operations
and generalizations of those operations can be expressed as special cases of tensor
contraction. Examples include matrix multiplication, matrix trace, vector dot product,
tensor Hadamard [element-wise] product, axis permutation, outer product, batch
matrix multiplication, bilinear transformations, and many more.
Modules
contractors | |
optimizers | Methods to produce a |
slow_versions | |
validation | |
wasm_bindings |
Structs
Contraction | A |
PathContraction | A |
SizedContraction | A |
Enums
ContractionOrder | The order in which to contract pairs of tensors and the specific contractions to be performed between the pairs. |
OptimizationMethod | Strategy for optimizing the contraction. The only currently supported options are "Naive" and "Reverse". |
PathContractionSteps | Either a singleton contraction, in the case of a single input operand, or a list of pair contractions, given two or more input operands |
Traits
ArrayLike | |
PathContractor |
Functions
einsum | |
einsum_path | |
einsum_sc | |
generate_optimized_order | Given a |
slow_einsum | |
slow_einsum_given_sized_contraction | |
slow_einsum_with_flattened_operands_as_json_string_as_json | |
tensordot | |
validate | Wrapper around Contraction::new(). |
validate_and_optimize_order | |
validate_and_size | Wrapper around SizedContraction::new(). |
validate_and_size_from_shapes | Only included so the function can be called from WASM, i.e. without
arguments that are already ndarray |
validate_and_size_from_shapes_as_string_as_json | |
validate_as_json |