Traceback (most recent call last):


 "train.py", line 85, in <module>

with amp.scale_loss(loss_G, optimizer_G) as scaled_loss: scaled_loss.backward()



 "/home/cvv/anaconda3/envs/pytorch15/lib/python3.7/contextlib.py", line 119, in __exit__

next(self.gen)


 "/home/cvv/anaconda3/envs/pytorch15/lib/python3.7/site-packages/apex/amp/handle.py", line 123, in scale_loss

optimizer._post_amp_backward(loss_scaler)


 "/home/cvv/anaconda3/envs/pytorch15/lib/python3.7/site-packages/apex/amp/_process_optimizer.py", line 249, in post_backward_no_master_weights

post_backward_models_are_masters(scaler, params, stashed_grads)


 "/home/cvv/anaconda3/envs/pytorch15/lib/python3.7/site-packages/apex/amp/_process_optimizer.py", line 135, in post_backward_models_are_masters

scale_override=(grads_have_scale, stashed_have_scale, out_scale))


 "/home/cvv/anaconda3/envs/pytorch15/lib/python3.7/site-packages/apex/amp/scaler.py", line 184, in unscale_with_stashed

out_scale/stashed_have_scale)


 "/home/cvv/anaconda3/envs/pytorch15/lib/python3.7/site-packages/apex/amp/scaler.py", line 148, in unscale_with_stashed_python

self.dynamic)


 "/home/cvv/anaconda3/envs/pytorch15/lib/python3.7/site-packages/apex/amp/scaler.py", line 22, in axpby_check_overflow_python

cpu_sum = float(model_grad.float().sum())
RuntimeError: CUDA error: an illegal memory access was encountered
Traceback (most recent call last):


 "/Users/glennjocher/opt/anaconda3/envs/env1/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3331, in run_code

exec(code_obj, self.user_global_ns, self.user_ns)


 "<ipython-input-5-be04c762b799>", line 5, in <module>

c = a / 0
RuntimeError: ZeroDivisionError
