title: What's the purpose of torch.autograd.Variable?
body: <p>I load <code>features</code> and <code>labels</code> from my training dataset. Both of them are originally numpy arrays, but I change them to the torch tensor using <code>torch.from _numpy(features.copy())</code> and <code>torch.tensor(labels.astype(np.bool))</code>.</p>
  
  <p>And I notice that <code>torch.autograd.Variable</code> is something like <code>placeholder</code> in <code>tensorflow</code>. </p>
  
  <p>When I train my network, first I tried</p>
  
  <pre class="lang-py prettyprint-override"><code>features = features.cuda()
  labels = labels.cuda()
  
  outputs = Config.MODEL(features)
  loss = Config.LOSS(outputs, labels)
  </code></pre>
  
  <p>Then I tried</p>
  
  <pre class="lang-py prettyprint-override"><code>features = features.cuda()
  labels = labels.cuda()
  
  input_var = Variable(features)
  target_var = Variable(labels)
  outputs = Config.MODEL(input_var)
  loss = Config.LOSS(outputs, target_var)
  </code></pre>
  
  <p>Both blocks succeed in activating training, but I worried that there might be trivial difference.</p>