docs.rs failed to build tch-0.0.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
tch-0.15.0
tch-rs
Experimental rust bindings for PyTorch. The code generation part for the C api on top of libtorch comes from ocaml-torch.
Instructions
- Get
libtorch
from the PyTorch website download section and extract the content of the zip file. - Add the following to your
.bashrc
or equivalent.
- You should now be able to run some examples, e.g.
cargo run --example basics
.
Examples
The following code defines a simple model with one hidden layer.
This model can then be trained on the MNIST dataset with the following code.
fn main(
More examples can be found in the examples
directory. They can be run
using the following command: