In C++ we can declare a vector and then add undefined number of elements to that by push_back function, e.g.,:
std::vector<float> v;
for (int i=0; i< n; i++)
  v.push_back(i);

in which n can be any number. In other words, in the declaration time, I do not need to instantiate std::vector with a known number of elements.
In torch, we I create a tensor, I could not find any torch::tensor that does not need to define the number of elements, and also could not find functions like push_back. Is there such a functionality in torch?