5 releases
Uses new Rust 2024
new 0.2.4 | Apr 24, 2025 |
---|---|
0.2.3 | Apr 22, 2025 |
0.2.2 | Apr 20, 2025 |
0.2.1 | Apr 19, 2025 |
0.2.0 | Apr 19, 2025 |
#612 in Data structures
325 downloads per month
Used in flashlight
50KB
735 lines
flashlight_tensor
Tensor library written in pure rust, designed mostly for matrix operations
project not related to similarly named flashlight. The name was coincidental and chosen independently.
Features
- n-dimensional tensors
- Element-wise operations
- Scalar multiplication and addition
- Tensor multiplication and addition
- Matrix transformation
- Dot product
- CPU only, with GPU support in plans
Instalation
[dependencies]
flashlight_tensor = "0.2.4"
Quick Start
use flashlight_tensor::prelude::*;
fn main(){
//2 rows, 2 collumns, fill with 1.0
let a: Tensor<f32> = Tensor::fill(1.0, &[2, 2]);
}
Documentation
all tensor operations in tensor category
Tests
Run tests with:
cargo test
Patch notes
- V0.2.4:
- matrix_vec/col, now return a matrix, not vector
- matrix_col/row_sum/prod, return a sum/product of all collumns/rows in matrix