rsdiff
Warning: The library is currently in the early stages of development and is not yet ready for production use.
rsdiff
is a Rust library enabling the automatic differentiation of functions using various techniques
Background
Autodifferentiation is a powerful technique used in machine learning and optimization, allowing for efficient computation of gradients. The rsdiff
library aims to provide a robust foundation for building autodifferentiation systems by leveraging hypergraphs to represent complex relationships between variables.
Features
-
hash_graph
- A hash-based hypergraph implementation.
Usage
Add this to your Cargo.toml
:
[]
= [
"hash_graph",
"macros",
]
= "0.1.x"
Examples
For more detailed examples, please refer to the examples directory.
Example #1: Basic Usage
extern crate rsdiff;
Getting Started
Prerequisites
Ensure you have the latest version of Rust installed. You can install Rust using rustup.
|
After installation, I always recommend ensuring that rustup is updated to the latest version:
And to add the latest nightly toolchain, which is often useful for development:
Additionally, you may wish to install the cargo-binstall
utility to streamline the installation of Rust binaries:
If necessary, add the wasm32-*
target(s) if you plan to compile for WebAssembly:
Building from the source
Start by cloning the repository
Then, navigate to the project directory:
Once you're in the project directory, you can build the project using cargo
:
Or, if you want to run the tests, you can use:
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.