Yeah, I see the issue.
Could you remove the truncated images and try it again?
I still have the feeling the error is somehow related to the data.
EDIT: Also, could you remove the cuda() calls from this line:
loss = cren_loss(output.cuda(), target_long.cuda())