sometimes CUDA error: device-side assert triggered occurs. with this.
image963×60 4.15 KB
The error indicates loss = torch.tensor(0).float().cuda().
This is my code.
loss = torch.tensor(0).float().cuda()
...get loss_A
loss += loss_A

What`s wrong in my code?