RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation, but there is no inplace operation?

For this training code , why the runtime error when there is no inplace operation ?

The above runtime error is solved with this github commit