Hi everyone, i have this error when training my network. I don’t see where is the error in my code
THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1532581333611/work/aten/src/THC/generated/../generic/THCTensorMathPointwise.cu line=464 error=59 : device-side assert triggered
Traceback (most recent call last):
  File "train.py", line 213, in <module>
    train()
  File "train.py", line 154, in train
    loss_id.backward()
  File "/home/fstu1/miniconda3/lib/python3.6/site-packages/torch/tensor.py", line 93, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph)
  File "/home/fstu1/miniconda3/lib/python3.6/site-packages/torch/autograd/__init__.py", line 90, in backward
    allow_unreachable=True)  # allow_unreachable flag
RuntimeError: cuda runtime error (59) : device-side assert triggered at /opt/conda/conda-bld/pytorch_1532581333611/work/aten/src/THC/generated/../generic/THCTensorMathPointwise.cu:464

The train() function
model = Model(pretrained=True)
model = model.cuda()
for i, (inputs, targets) in enumerate(train_loader):
     inputs = inputs.cuda()
     inputs = Variable(inputs)
     outputs = model(inputs)
     targets = targets.cuda()
     targets = Variable(targets)
     loss_id = criterion(ipnuts, targets)
     optimizer.zero_grad()
     loss_id.backward()
     optimizer.step()

Thank you for helping me debug this