title: CUDA runtime error (59) : device-side assert triggered
body: <pre class="lang-none prettyprint-override"><code>THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1524584710464/work/aten/src/THC/generated/../generic/THCTensorMathPointwise.cu line=265 error=59 : device-side assert triggered
  Traceback (most recent call last):
    File &quot;main.py&quot;, line 109, in &lt;module&gt;
      train(loader_train, model, criterion, optimizer)
    File &quot;main.py&quot;, line 54, in train
      optimizer.step()
    File &quot;/usr/local/anaconda35/lib/python3.6/site-packages/torch/optim/sgd.py&quot;, line 93, in step
      d_p.add_(weight_decay, p.data)
  RuntimeError: cuda runtime error (59) : device-side assert triggered at /opt/conda/conda-bld/pytorch_1524584710464/work/aten/src/THC/generated/../generic/THCTensorMathPointwise.cu:265
  </code></pre>
  <p>How do I resolve this error?</p>