RuntimeError: cuda runtime error (59) : device-side assert triggered at /pytorch/torch/lib/THC/generic/THCStorage.c:36 
  
  
    Hi, 
First thing is to try to run the code on CPU. CPU code has more checks so it will possibly return a better error message. 
If the CPU code runs without error, then run the same thing with CUDA_LAUNCH_BLOCKING=1 to get a proper error message and stack trace.
  


This suggestion might be the case for your problem.