Saving a vector of tensors crashes when one of the tensors is undefiend
PyTorch Forums
Saving a vector of tensors crashes when one of the tensors is undefiend
I have an application where I use undefined tensors for a zero tensor of any size. This is done to avoid allocating lots of zeros (and seems reasonable). When I try to save a vector with an undefined tensor, the save routine crashes; e.g. #include <filesystem> #include <torch/torch.h> int main() { // // fs namespace fs = std::filesystem; // // vec_ten_in std::vector<at::Tensor> vec_ten_in; vec_ten_in.push_back( torch::tensor( {1, 2} ) ); vec_ten_in.push_back( at...
0 comments
No comments yet.