RuntimeError: 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; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).

解决方法

  将block内所有relu的inplace = True 改为false

相关文章:

  • 2021-07-26
  • 2021-10-29
  • 2022-12-23
  • 2021-12-17
  • 2022-12-23
  • 2022-02-08
猜你喜欢
  • 2022-03-01
  • 2021-12-12
  • 2022-12-23
  • 2021-06-13
  • 2021-06-02
  • 2022-12-23
  • 2021-11-06
相关资源
相似解决方案