Merge pull request #16852 from sneaxiy/fix_merge_lod_tensor_op_infer_shape

Fix merge_lod_tensor_op infer shape
revert-16839-cmakelist_change
Tao Luo 6 years ago committed by GitHub
commit d966faae95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -164,7 +164,9 @@ class MergeLoDTensorInferShape : public framework::InferShapeBase {
auto mask_dim = context->GetInputDim("Mask");
PADDLE_ENFORCE_EQ(mask_dim.size(), 2);
PADDLE_ENFORCE_EQ(mask_dim[1], 1);
if (context->IsRuntime() || mask_dim[1] > 0) {
PADDLE_ENFORCE_EQ(mask_dim[1], 1);
}
context->SetOutputDim("Out", context->GetInputDim("InTrue"));
}

Loading…
Cancel
Save