We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8c764c commit 285a0b7Copy full SHA for 285a0b7
paddle/fluid/operators/batch_norm_op.cc
@@ -68,16 +68,17 @@ void BatchNormOp::InferShape(framework::InferShapeContext *ctx) const {
68
auto scale_dim = ctx->GetInputDim("Scale");
69
auto bias_dim = ctx->GetInputDim("Bias");
70
71
+ PADDLE_ENFORCE_EQ(scale_dim.size(), 1UL);
72
73
+
74
bool check = true;
75
if ((!ctx->IsRuntime()) && (framework::product(scale_dim) <= 0 ||
76
framework::product(bias_dim) <= 0)) {
77
check = false;
78
}
79
80
if (check) {
- PADDLE_ENFORCE_EQ(scale_dim.size(), 1UL);
81
PADDLE_ENFORCE_EQ(scale_dim[0], C);
82
83
84
ctx->SetOutputDim("Y", x_dims);
0 commit comments