提交 94e9170a 编写于 作者: Z zp7 提交者: GitHub

fix crash when input type is lod-tensor and input dims is 2 (#1703)

上级 a1f10707
......@@ -23,11 +23,7 @@ void FeedOp<DeviceType, T>::InferShape() const {
out_dims[0] = this->param_.BatchSize();
int col = this->param_.Col();
auto input_dims = this->param_.InputX()->at(col).dims();
if (input_dims.size() == 4) {
this->param_.Out()->Resize(input_dims);
} else {
this->param_.Out()->Resize(out_dims);
}
this->param_.Out()->Resize(input_dims);
}
} // namespace operators
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册