pypipytorch95% confidence\u2191 98

CUDA runtime error (59) : device-side assert triggered

Full error message
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 "main.py", line 109, in <module>
    train(loader_train, model, criterion, optimizer)
  File "main.py", line 54, in train
    optimizer.step()
  File "/usr/local/anaconda35/lib/python3.6/site-packages/torch/optim/sgd.py", 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

How do I resolve this error?

In general, when encountering cuda runtine errors, it is advisable to run your program again using the CUDA_LAUNCH_BLOCKING=1 flag to obtain an accurate stack trace. In your specific case, the targets of your data were too high (or low) for the specified number of classes.

API access

Get this solution programmatically \u2014 free, no authentication.

curl https://depscope.dev/api/error/42483402f1b52777bc900fde6977f1d383cf1e55feef55cd0923b909606d19b6
hash \u00b7 42483402f1b52777bc900fde6977f1d383cf1e55feef55cd0923b909606d19b6
CUDA runtime error (59) : device-side assert triggered — DepScope fix | DepScope