Skip to content

Commit 82c43f9

Browse files
author
Yang Yang
committed
add test
1 parent 6f5e435 commit 82c43f9

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import unittest
2+
import numpy as np
3+
from op_test import OpTest
4+
5+
6+
class TestFillZerosLikeOp(OpTest):
7+
def setUp(self):
8+
self.op_type = "fill_constant_batch_size_like"
9+
self.inputs = {'Input': np.random.random((219, 232)).astype("float32")}
10+
self.attrs = {'value': 3.5, 'shape': [-1, 132, 777]}
11+
12+
out = np.random.random((219, 132, 777)).astype("float32")
13+
out.fill(3.5)
14+
self.outputs = {'Out': out}
15+
16+
def test_check_output(self):
17+
self.check_output()
18+
19+
20+
if __name__ == "__main__":
21+
unittest.main()

0 commit comments

Comments
 (0)