Hi sorry for late response. I have reduced the batch size now using batch_size=1 and also update the lastest version of Pytorch as according to your suggestions but finally after all again got the error.
File “/home/ali/BioNet_project/pytorch_version/utils.py”, line 89, in train
tot_soft += l.item()
RuntimeError: CUDA error: device-side assert triggered