Cannot get the value of torch::TensorList in vector

 for (i=0; i<score_.sizes()[0]; i++){
    if (score_[i].item<double>() > cfg_visualization_eval_score_threshold){

        for(torch::TensorList result_vec: result_vector) {
                  std::cout<< result_vec.size() << "result_vec.size()" << std::endl;

                  std::cout<< result_vec << endl << "result_vec" << std::endl;

I think push_back works well, but when I print out result_vec, it shows correct output of result_vec.size() as 3 but the value is weird as shown below.

[[ Tensor (undefined) ], [ Tensor (undefined) ], [ Tensor (undefined) ]]

Is there anyone who knows the reason of this weird result?

1 Like