pytorch-cpp
pytorch-cpp copied to clipboard
Conversion from float std::vector to Aten Tensor and vice versa?
Conversion from float std::vector to Aten Tensor and vice versa?
@kirill-pinigin Providing the .data()
output of a vector to
a tensorFromBlob()
function should work. Not really relevant but close example:
https://github.com/warmspringwinds/pytorch-cpp/blob/master/examples/read_allocated_gpu_memory.cpp#L64