4 ms·
Burn looks interesting... so I notice in the sample code you mention: use burn_tch::TchBackend; I don't see "TchBackend" mentioned in the docs. Is Tch = torch
by lacker 4y ago
Burn looks interesting... so I notice in the sample code you mention:
use burn_tch::TchBackend;
I don't see "TchBackend" mentioned in the docs. Is Tch = torch and Burn can be used as a Torch (or tch-rs) wrapper? Or am I imagining too much from a miscellaneous three letter prefix?
I've been looking for a good way to do standard modern AI stuff in Rust, and was leaning towards tch-rs because it exists and seems reasonably frequently maintained, but if you have some sort of reason to use Burn instead then I'm curious to hear it.
- antimora 4y agoThat's right, Tch stands for torch. We use tch-rs (bindings to torch++). The selling point of burn is that it offers the full level of deep learning framework with ability to swap backends. This is useful, for example, I can train with Torch backend on GPUs but if I want to deploy, lets say to embedded device, I can use NDArray backend, which supports pure rust code (also with various BLAS acceleration if needed). You can also use NDArray backend with Accelerate (iOS or MacOS blass). You can even compile for WASM because Burn supports inference with no_std (you can try this online demo https://burn-rs.github.io/demo https://burn-rs.github.io/demo). The framework is well written and follows Rust's conventions and best practices. It's still evolving, however. Give it a try. If you find problems, you can file a ticket or join discord chat.