RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn
文章目录问题描述原因解决方法问题描述在重新加入模型,再训练的时候出现了如下问题:Traceback(mostrecentcalllast):File"D:\Ghost_Demo\train.py",line200,intrain_loss,train_acc=train(model_ft,DEVICE,train_loader,optimizer,epoch,model_ema)File"D:\G