tch-rs icon indicating copy to clipboard operation
tch-rs copied to clipboard

Rust bindings for the C++ api of PyTorch.

Results 213 tch-rs issues
Sort by recently updated
recently updated
newest added

Recently I've been working on a project where I need to supply custom gradient into the back propagation process. Therefore I need an advanced `backward` function where I can pass...

`libtorch` fails to extract on Windows when the project is near the 260 char windows path limit, this adds a windows check and adjusts the path. Secondly, this normalizes paths...

This adds some basic support for cuda streams #234. Note that this has not been tested yet and is even unlikely to compile as I don't have access to a...

- Scaling factor is initialized to 1 instead of [0, 1] uniform I discovered an issue that the running_var and scaling factor converge to very small values. [Here](https://imgur.com/yU0Zutc) is an...

- Use serde + envy to parse environment variables - Propagate errors to main() - Organize "cargo:*" printing

This PR upgrades dependencies using `cargo upgrade` from [cargo-edit](https://crates.io/crates/cargo-edit). Note that it introduces breaking changes due to `cpython` and `half` update, requiring minor version bump.

`TryFrom` now receives a referenced type instead of owned type. The move is unnecessary because it always copies the data. `TryInto` impls are removed in flavor of `TryFrom`. That's because...

I'd like to present the Wasserstein GAN with gradient penalty example. It is slightly modified from the [gan example](https://github.com/LaurentMazare/tch-rs/blob/master/examples/gan/main.rs). It removes batch norms in discriminator as the paper suggested, and...