Maybe some operation shall support both Tensor and Variable?

I think it is sometimes puzzling to transform between these following data type:

  • Tensor
  • Variable
  • cuda Variable

Some operations such as torch.index_select does not support Variable, while I think it is better to support them both.
Seems that the key difference between a Tensor and a Variable is whether to keep the gradient history, however some operations do not need that in most cases.

Good point. And we are in progress of merging Variable and Tensor classes :slight_smile: So in future everything will work on everything (mostly).

1 Like