title: IndexError: Target 60972032 is out of bounds
body: <p>I am trying to call cross entropy loss but it says the index is out of range</p>
  <pre class="lang-py prettyprint-override"><code>loss = nn.CrossEntropyLoss()
  target = torch.empty(128, dtype=torch.long)
  result = loss(output, target)
  </code></pre>
  <p>Note the output has the shape <code>torch.Size([128, 10])</code></p>