yubeic:

If I create my variables by the following code, can I assume this is a clean tensor in the current version?


It’s not a clean tensor. It’s a variable that doesn’t track history. But it basically satisfies what you need.
Moreover, since you are using the functional interface. If your input and filters don’t require grad, then no history will be tracked anyways.



 yubeic:

I hope the ‘forward’ in the previous reply doesn’t mean that the optimization is unrolled into many layers, I guess it won’t in the above setting. But can anyone confirm this?


I’m not sure what you mean by optimization being unrolled into many layers. Optimization (you probably mean model optimization) is not even applied here. There is no history, no gradients, only forward results.



 yubeic:

But since PyTorch build the graph dynamically, I’m a little confused on how to achieve this safely.


Why does dynamic graph imply being not safe?



 yubeic:

Comment: Putting Variable under autograd package is apparently a choice with the pre-assumption that PyTorch will focus on error BP based models. This assumption makes PyTorch a little narrow minded. If PyTorch can provide clean convolutions for Tensors, all the people working on inference based vision models (RBM or general graphical models, adaptive deconvNet, sparse coding etc.) will probably benefit from it. Further it will make PyTorch much more general looking (as also a mathematical library) and yet this step is so easy to make.


You have some valid point, but it’s not really that we are narrow minded. It was a design choice to separate things that tracks history for BP (which became Variable) and things that don’t (which became Tensor). And the former is naturally in the .autograd namespace. And due to popularity reasons and code structure, things like conv layers are only directly supported on Variables. (you can also make them work directly on tensors with a bit of work.) Futhermore, this volatile=True option (you don’t need requires_grad=False if you set volatile=True) already gives you very similar experience to directly working on tensors. Moreover, as @albanD mentioned above, we have merged the two classes together. So I don’t really get the reason for this complaint.