Crate elara_math

Source
Expand description

This crate is a Rust-native tensor and math library, developed for Project Elara. It aims to be a basic implementation of common machine learing and scientific computing tools in Rust. It tries to give a Rust experience similar to SciPy, NumPy, and PyTorch/TensorFlow, offering:

  • Tensors: N-dimensional differentiable arrays (via Tensor)
  • An implementation of reverse-mode automatic differentiation
  • Numerical solvers for calculus (only numerical integration/quadrature is fully-supported at the moment, the ODE solver has been moved to elara-array)

To get started, just run cargo install elara-math to add to your project. We offer several examples in our GitHub repository to reference and learn from.

Modules§

prelude
elara-math prelude

Macros§

count
A macro for counting the number of args passed to it
scalar
Macro for quickly creating scalar tensors
tensor
Macro for quickly creating tensors

Structs§

Linear
A 2D linearly densely-connected layer
Model
A neural network model with a keras-inspired API
Tensor
A PyTorch-like differentiable tensor type
TensorData
Backing data for Tensor

Enums§

Activations
Common activation functions
Optimizers
Common optimizers

Traits§

Layer
A general trait of a layer of a neural network

Functions§

mse
Mean squared error function