Why pytorch gradients are array but not vector?

后端 未结 0 1566
有刺的猬
有刺的猬 2020-12-08 02:53

I am trying to calculate the dot of gradients of the same layer of two different epochs but when I am using print(model.layer1[0].weight.grad) it returns

相关标签:
回答
  • 消灭零回复
提交回复
热议问题