提交 0333977f 编写于 作者: L liuqi

Fix op type judge bug in simple net.

上级 b4d770b8
......@@ -23,7 +23,7 @@ SimpleNet::SimpleNet(const std::shared_ptr<const NetDef>& net_def,
std::unique_ptr<OperatorBase> op{nullptr};
OperatorDef temp_def(operator_def);
op = CreateOperator(temp_def, ws, type);
if (!op) {
if (op) {
operators_.emplace_back(std::move(op));
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册