提交 737ea054 编写于 作者: Y Yu Yang

Use static_cast, Fix unittest

上级 e2fd2bd0
......@@ -120,7 +120,7 @@ std::shared_ptr<OperatorBase> BackwardRecursive(
OpRegistry::CreateOp(
"add", {dup_outputs}, {name},
{{"input_format",
std::vector<int>{0, (int)dup_outputs.size()}}})});
std::vector<int>{0, static_cast<int>(dup_outputs.size())}}})});
}
insert_position.sort(
......
......@@ -181,6 +181,8 @@ TEST(Backward, simple_op_not_need_grad) {
auto no_input_gop = f::Backward(*fwd, {"X", "b"});
ASSERT_NE(no_input_gop, nullptr);
ASSERT_TRUE(no_input_gop->IsNetOp());
ASSERT_EQ(0UL, std::static_pointer_cast<f::NetOp>(no_input_gop)->ops_.size());
}
TEST(Backward, net_fc_backward_normal) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册