yeah,  I didn’t use torch.no_grad in the train before. and i used torch.no_grad in the model.eval . This error will not occur .  But this time I don’t know why the error occur in the train .even i set the batch size=1,this error still occurs, i didnt konw why.