File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
python/paddle/fluid/tests/unittests Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -29,14 +29,19 @@ def setUp(self):
29
29
self .inputs = {"X" : self .X }
30
30
self .Y = np .random .random (8 ).astype ('float32' )
31
31
self .outputs = {'Out' : self .Y }
32
- self .attrs = {'use_mkldnn ' : self . use_mkldnn }
32
+ self .attrs = {'max ' : 1.0 , 'min' : 0.0 , 'seed' : 1 }
33
33
34
34
def test_check_output (self ):
35
35
self .check_output_customized (self .verify_output )
36
+ y1 = self .out
37
+ self .check_output_customized (self .verify_output )
38
+ y2 = self .out
39
+ self .assertTrue (np .array_equal (y1 , y2 ))
40
+ self .assertEqual (len (y1 ), len (self .Y ))
36
41
37
42
def verify_output (self , outs ):
38
43
out = np .array (outs [0 ])
39
- self .assertEqual ( len ( out ), len ( self . Y ))
44
+ self .out = out
40
45
41
46
def init_kernel_type (self ):
42
47
pass
You can’t perform that action at this time.
0 commit comments