Hi,
Thank you for your answer. Why does broadcasting create any dependence to the nan ?
param is supposed to be a scalar value, but even while defining param = torch.tensor(1., required_grad=True), param.grad is still equal to nan.