[1]: https://github.com/LaurentMazare/tch-rs -> https://crates.io/crates/tch
[2]: https://github.com/guillaume-be/rust-bert -> https://crates.io/crates/rust-bert
https://github.com/stickeritis/sticker2/
Unfortunately, when I started this guillaume-be's rust-bert crate wasn't around yet (I think), so I also ported some of the models from Huggingface transformers:
https://github.com/stickeritis/sticker-transformers/
At any rate, I can highly recommend the tch crate if you are looking to build neural networks in Rust.
I see a way to do it [0] but... I already have a PhD to finish.
[0]: a macro compiling functions into an intermediate representations that are transformed with const functions (gradient computation) at compile time and jitted into XLA at runtime.
But, adding auto differentiation to match the Swift for tensorflow behaviour, sounds like a serious undertaking, and I doubt is on anyone's radar.
But yeah, I've been wanting this for a while. Shoehorning Rust everywhere is the endgame.
I hope all the work being done on improving incremental compilation[a] and developing interactive Rust REPLs like evcxr[b] makes using Rust for AI a practical reality.
[a] https://doc.rust-lang.org/edition-guide/rust-2018/the-compil...
[b] https://github.com/google/evcxr