tch 0.24.0

Rust wrappers for the PyTorch C++ api (libtorch).
Documentation
1
2
3
4
5
6
7
use tch::{Device, Tensor};

#[test]
fn tensor_device() {
    let t = Tensor::from_slice(&[3, 1, 4]);
    assert_eq!(t.device(), Device::Cpu)
}