我很困惑...
我的模型输出:
tensor([[0.0000,0.1537],...],grad_fn=<ReluBackward0>)
If I use print(output.grad) it gives me None but even after gradient computation with
loss.backward() I get the same result, which again is None...
Even with
with torch.set_grad_enabled(True):
added, still the same.
I've tried now with multiple model variants, always the same.
I was achieving good result with my model there seemed no problem, now I see this and I'm not sure any more if there not might be a major flaw I didn't recognized so …