Thank you @glaringlee. I want to create a torch::Tensor on device from (preferably const) std::vector.
I got around by calling torch::from_blob and .clone(). Not sure if there is any more convenient way to do so.
The link you provided to GitHub is expired.
The C++ doc describes the usage of torch::Tensor class instead of the torch::tensor function.