The program stoped in the second batch when using ys = ys.cuda()

I have indicatored the problem happen in sencond batch, when use ys = ys.cuda(), someone say it is that i am not release the first batch, but i don’t underdstand.

could anyone explain why this happen?

It hangs out there, just very very slow

does anybody see this and give a solution?