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
- ReLU and sigmoid
- forward/backward propagation merged operations on gpu
- CPU and GPU support
- GpuRunner
Instalation
[]
= "0.4.0"
# Experimental(Not everything documented and working. Use at your own risk)
= { = "https://github.com/Bejmach/flashlight_tensor"}
Documentation
Quick Start
For gpu usage go to examples on github
use *;
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
V0.2.5
- Propably something
V0.2.6
- better file structure
- mutable operations for iterative functions
V0.2.6
- activation functions for neural network
V0.3.0
- gpu operations + docs
V0.3.1
- gpu only backward/forward propagation merged operations, kinda hard to perform, will try to abstact it into gpu_runner
- examples, with merged machine learning operations runtime
V0.4.0
- gpu_chunking
- gpu_runner
What changed in 4.0
- less code for similar result
Old way
let mut gpu_data = new;
gpu_data.disable_shapes;
let sample = from_data;
gpu_data.append;
let mut buffers = init.await;
buffers.set_shader;
buffers.prepare;
let full_gpu_output: = buffers.run.await;
New way
let mut runner: GpuRunner = init;
let sample = from_data;
runner.append;
let output_data: = runner.add.await;
Plans for 0.5.0
- nothing for now