ebetica / autogradpp

Direct C++ Interface to PyTorch
MIT License
80 stars 12 forks source link

TensorList and VariableList are traps #51

Open ebetica opened 6 years ago

ebetica commented 6 years ago

They don't own the objects, which means you can't really create and pass in a TensorList, unless it's backed by a owning list with the tensors.

Just use a std::vector. Let's probably define this in ag, and ask ATen to hide it in detail or something.