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)