Experimental Machine Learning Library
minimum_ml is a lightweight, experimental machine learning library written in Rust.
It provides basic building blocks for neural networks, including:
- Tensor operations and automatic differentiation
- Common activation functions (ReLU, Sigmoid, Softmax, etc.)
- Neural network layers (Linear, Convolution, etc.)
- Optimizers (SGD, Adam)
- Quantization support for model compression
- Dataset utilities for batching and iteration
Features
This crate supports optional features to minimize dependencies:
serialization: Enable model saving/loading with serde (addsserde,serde_json,anyhow)logging: Enable TensorBoard logging (addstensorboard-rs,chrono)progress: Enable progress bars during training (addsindicatif)full: Enable all features
By default, no optional features are enabled, keeping the dependency footprint minimal.
Examples
Minimal install (only core dependencies):
[]
= "0.1.1"
With serialization support:
[]
= { = "0.1.1", = ["serialization"] }
With all features:
[]
= { = "0.1.1", = ["full"] }
Usage Example
use minimum_ml::ml::{Tensor, Graph};
use minimum_ml::ml::params::MM;
// Create a computational graph
let graph = Graph::new();
// Create tensors and perform operations
let x = Tensor::new(vec![1.0, 2.0, 3.0], vec![3]);
let linear = MM::new(3, 2);
let output = linear.forward(&graph, &x);