Einops

Contents

This is a rust port of the incredible einops library.

Einops provides flexible and powerful api to represent tensor operations in a readable and reliable way.

Example

// We create a random tensor as input
let input = Tensor::randn(&[100, 32, 64], (Kind::Float, Device::Cpu));

// Rearrange operation
let output = Rearrange::new("t b c -> b c t")?.apply(&input)?;
assert_eq!(output.size(), vec![32, 64, 100]);