LaurentMazare / tch-rs

Rust bindings for the C++ api of PyTorch.
Apache License 2.0
4.28k stars 340 forks source link

Obsolete example in README.md #25

Closed jerry73204 closed 5 years ago

jerry73204 commented 5 years ago

Hi I'm new to tch, and the Rust implementation is amazing. I took some time to write tch code, and found the example in "Writing a Simple Neural Network" section cannot compile. Simply the argument list of nn::linear is wrong. It expects additional LinearConfig type parameter, and first argument should have nn::Path type instead of nn::VarStore.

Another mild suggestion is that please make the example complete. At least include the extern crate tch; and a very simple main function. That would be a great help for newbies.

LaurentMazare commented 5 years ago

Thank you for your feedback, I've tweaked the readme to include both a very simple example of tensor manipulation and a fixed/standalone version of this example.

jerry73204 commented 5 years ago

Nice! The issue can be closed.