A deep learning library for Rust featuring shape-checked tensors and neural networks with compile-time safety.
dfdx is a deep learning library for Rust that provides shape-checked tensors and neural network components. It enables developers to build and train machine learning models with compile-time safety, reducing runtime errors and improving reliability. The library includes GPU acceleration via CUDA and a suite of standard optimizers for efficient model training.
Rust developers and researchers who need a safe, performant deep learning framework with strong compile-time guarantees. It's ideal for those building neural networks in Rust who want to avoid runtime shape errors.
Developers choose dfdx for its unique combination of ergonomics, compile-time shape checking, and performance. Its design minimizes unsafe code and runtime overhead while providing GPU acceleration and a flexible module system.
Deep learning in Rust, with shape checked tensors and neural networks
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Tensor operations like matmul and conv2d are shape and type checked at compile time, eliminating runtime errors and increasing reliability, as highlighted in the README's design goals.
Supports high-performance tensor operations on NVIDIA GPUs by enabling the CUDA feature, though it requires installation of NVIDIA's CUDA toolkit.
Provides simple, shape-checked modules like Linear and Transformer that can be composed using tuples, making model construction intuitive, as shown in the API preview.
Uses a unique ownership model without Rc/RefCell for gradient tapes, enabling precise control over computation graphs and reducing dynamic borrow checks.
The library is still in pre-alpha with planned breaking releases, making it unsuitable for production or any project requiring stable dependencies.
GPU acceleration is exclusive to NVIDIA hardware via CUDA, leaving out AMD, Intel, or other GPU platforms, which restricts hardware flexibility.
Being a Rust library, it lacks the extensive pre-trained models, community contributions, and tooling found in Python-based frameworks like PyTorch.