PhyDNet icon indicating copy to clipboard operation
PhyDNet copied to clipboard

CUDA error: an illegal memory access was encountered

Open zimingzhong opened this issue 4 years ago • 0 comments

I want to change the code from .to(device) to .cuda() in order to run model on mutil-gpu. But fails. Getting the following error. Model can get loss, but after loss.backward() Model cannot access loss value. With more debug, this situation early happend on line 32 and 34 on model.py. Value hidden_tilde and combinlined cannot access their value(RuntimeError: CUDA error: an illegal memory access was encountered) after backward(). Traceback (most recent call last): File "main.py", line 180, in plot_losses = trainIters(encoder, args.n_epochs, print_every=args.print_every, eval_every=args.eval_every) File "main.py", line 103, in trainIters teacher_forcing_ratio) File "main.py", line 81, in train_on_batch return loss.item() / target_length RuntimeError: CUDA error: an illegal memory access was encountered

zimingzhong avatar Mar 02 '21 08:03 zimingzhong