l2 1.0.3

L2 is a Pytorch-style Tensor+Autograd library written in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use l2::tensor::*;

#[allow(clippy::many_single_char_names)]
fn main() -> Result<(), l2::errors::TensorError> {
    let x: Tensor = Tensor::normal(&[2, 4], 0.0, 1.0)?;
    let y: Tensor = Tensor::normal(&[4, 1], 0.0, 1.0)?;

    let z: Tensor = l2::matmul(&x, &y)?;

    z.backward();

    println!("{}", z);

    Ok(())
}