doesn't have gradient. It will be set to zero

以下提醒是指这个向量不能训练,还是指初始梯度为0?

错误信息:
[w 1125 15:50:58.680000 00 grad.cc:63] grads[15]
‘style.15.bias’ doesn’t have gradient. It will be set to zero: Var(00000217F250DE40:1:1:0:i0:o0:s1,float32,style.15.bias,00000217E38AEC60)[512,]

我的代码:

class EqualConv2d(nn.Module):
    def __init__(
        self, in_channel, out_channel, kernel_size, stride=1, padding=0, bias=True
    ):
        super().__init__()

        self.weight = jt.randn(out_channel, in_channel, kernel_size, kernel_size)

是指 style.15.bias 这个权重没有接收到来自 loss 的梯度。一般原因是 style.15.bias 没有参与到 loss 的计算当中。