Rate this Page

Typedef torch::autograd::Variable#

Typedef Documentation#

using torch::autograd::Variable = at::Tensor#

Variable is exactly the same as Tensor (i.e.

we have using Variable = at::Tensor). This means you can perform all the usual mathematical and other operations you can perform on Tensors also on Variables.

The only reason we are keeping the Variable class is backward compatibility with external user’s legacy C++ frontend code. Our intention is to eliminate the Variable class in the near future.