提交 fff6f595 编写于 作者: T tangwei12

add unit test

上级 8f9bbc28
...@@ -62,8 +62,10 @@ class TestFillConstantOpWithSelectedRows(OpTest): ...@@ -62,8 +62,10 @@ class TestFillConstantOpWithSelectedRows(OpTest):
fill_constant_op.run(scope, place) fill_constant_op.run(scope, place)
# get result from Out # get result from Out
result_array = np.array(out) result_array = np.array(out.get_tensor())
self.assertEqual(result_array, np.full((123, 92), 3.8)) full_array = np.full((123, 92), 3.8, 'float32')
self.assertTrue(np.array_equal(result_array, full_array))
def test_fill_constant_with_selected_rows(self): def test_fill_constant_with_selected_rows(self):
places = [core.CPUPlace()] places = [core.CPUPlace()]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册