未验证 提交 a075e695 编写于 作者: W whs 提交者: GitHub

Fix unittest of flops and pruning walker (#351)

上级 135bd582
......@@ -33,7 +33,7 @@ class TestPrune(unittest.TestCase):
sum2 = conv4 + sum1
conv5 = conv_bn_layer(sum2, 8, 3, "conv5")
conv6 = conv_bn_layer(conv5, 8, 3, "conv6")
self.assertTrue(1597440 == flops(main_program))
self.assertTrue(792576 == flops(main_program))
if __name__ == '__main__':
......
......@@ -57,7 +57,7 @@ class TestPrune(unittest.TestCase):
conv_op = graph.var("conv4_weights").outputs()[0]
walker = conv2d_walker(conv_op, [])
walker.prune(graph.var("conv4_weights"), pruned_axis=0, pruned_idx=[])
print walker.pruned_params
print(walker.pruned_params)
if __name__ == '__main__':
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册