RuntimeError: (NotFound) No Output(X@GRAD) found for BatchNormGrad operator. [Hint: Expected ctx-

paddle 报错
RuntimeError: (NotFound) No Output(X@GRAD) found for BatchNormGrad operator.
[Hint: Expected ctx->HasOutput(framework::GradVarName("X")) == true, but received ctx->HasOutput(framework::GradVarName("X")):0 != true:1.] (at /paddle/paddle/fluid/operators/batch_norm_op.cc:468)

BN层的问题
修改方法:在BN层前加

if self.data_bn:
    x.stop_gradient = False
x = self.data_bn(x)
上一篇:C#版本与.NET版本对应关系


下一篇:tensorflow.python.framework.errors_impl.AlreadyExistsError: