ok here is the stacktrace.
File “main.py”, line 61, in
main(args, CORE)
File “main.py”, line 51, in main
CORE.train(args)
File “/home/ali/BioNet_project/pytorch_version/utils.py”, line 88, in train
l = criterion(output, y.long())
File “/home/ali/anaconda3/envs/test/lib/python3.8/site-packages/torch/nn/modules/module.py”, line 889, in _call_impl
result = self.forward(*input, **kwargs)
File “/home/ali/BioNet_project/pytorch_version/loss.py”, line 21, in forward
cross_entropy = F.nll_loss(predicted.log(), target, size_average=False)
File “/home/ali/anaconda3/envs/test/lib/python3.8/site-packages/torch/nn/functional.py”, line 2387, in nll_loss
ret = torch._C._nn.nll_loss2d(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
RuntimeError: cuda runtime error (710) : device-side assert triggered at /opt/conda/conda-bld/pytorch_1614378062065/work/aten/src/THCUNN/generic/SpatialClassNLLCriterion.cu:134
/opt/conda/conda-bld/pytorch_1614378062065/work/aten/src/THCUNN/SpatialClassNLLCriterion.cu:106: cunn_SpatialClassNLLCriterion_updateOutput_kernel: block: [1,0,0], thread: [960,0,0] Assertion t >= 0 && t < n_classes
failed.
/opt/conda/conda-bld/pytorch_1614378062065/work/aten/src/THCUNN/SpatialClassNLLCriterion.cu:106: cunn_SpatialClassNLLCriterion_updateOutput_kernel: block: [1,0,0], thread: [448,0,0] Assertion t >= 0 && t < n_classes
failed.
/opt/conda/conda-bld/pytorch_1614378062065/work/aten/src/THCUNN/SpatialClassNLLCriterion.cu:106: cunn_SpatialClassNLLCriterion_updateOutput_kernel: block: [1,0,0], thread: [449,0,0] Assertion t >= 0 && t < n_classes
failed.
/opt/conda/conda-bld/pytorch_1614378062065/work/aten/src/THCUNN/SpatialClassNLLCriterion.cu:106: cunn_SpatialClassNLLCriterion_updateOutput_kernel: block: [1,0,0], thread: [450,0,0] Assertion t >= 0 && t < n_classes
failed.
/opt/conda/conda-bld/pytorch_1614378062065/work/aten/src/THCUNN/SpatialClassNLLCriterion.cu:106: cunn_SpatialClassNLLCriterion_updateOutput_kernel: block: [1,0,0], thread: [456,0,0] Assertion t >= 0 && t < n_classes
failed.