原文:one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [3, 1280, 28, 28]], which is output 0 of LeakyReluBackward1, is at version 2;

RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: torch.cuda.FloatTensor , , , , which is output of LeakyReluBackward , is at version expect ...

2020-07-13 18:41 0 2905 推荐指数:

查看详情

torch.cuda.FloatTensor

Pytorch中的tensor又包括CPU上的数据类型和GPU上的数据类型,一般GPU上的Tensor是CPU上的Tensor加cuda()函数得到。 一般系统默认是torch.FloatTensor类型。例如data = torch.Tensor(2,3)是一个2*3的张量,类型 ...

Mon Feb 24 23:54:00 CST 2020 0 5381
torch.cuda.FloatTensor

Pytorch中的tensor又包括CPU上的数据类型和GPU上的数据类型,一般GPU上的Tensor是CPU上的Tensor加cuda()函数得到。 一般系统默认是torch.FloatTensor类型。例如data = torch.Tensor(2,3)是一个2*3的张量,类型 ...

Tue Dec 22 16:56:00 CST 2020 0 1141
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM