tracel-ai / burn

Burn is a new comprehensive dynamic Deep Learning Framework built using Rust with extreme flexibility, compute efficiency and portability as its primary goals.
https://burn.dev
Apache License 2.0
9.02k stars 447 forks source link

Add more examples to `Tensor` type #2450

Open InAnYan opened 3 weeks ago

InAnYan commented 3 weeks ago

I would like to see examples for every method in Tensor types.

That would be useful from people that came from PyTorch. Because Python language is highly dynamic and Rust is not, it's not easy to map PyTorch code to Rust with Burn

InAnYan commented 3 weeks ago

I would also be awesome if you could show how to use indexing, like there:

https://docs.rs/tch/latest/tch/index/index.html