File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed
python/paddle/fluid/tests/unittests Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -132,20 +132,13 @@ def test_uniform_initializer_two_op(self):
132
132
lod_level = 0 ,
133
133
name = "param" ,
134
134
initializer = initializer .UniformInitializer (- 4.2 , float (i ), 123 ))
135
- self .assertEqual (len (block .ops ), 2 )
135
+ self .assertEqual (len (block .ops ), 1 )
136
136
init_op0 = block .ops [0 ]
137
137
self .assertEqual (init_op0 .type , 'uniform_random' )
138
138
self .assertAlmostEqual (init_op0 .attr ('min' ), - 4.2 , delta = DELTA )
139
139
self .assertAlmostEqual (init_op0 .attr ('max' ), 1.0 , delta = DELTA )
140
140
self .assertEqual (init_op0 .attr ('seed' ), 123 )
141
141
142
- self .assertEqual (len (block .ops ), 2 )
143
- init_op1 = block .ops [1 ]
144
- self .assertEqual (init_op1 .type , 'uniform_random' )
145
- self .assertAlmostEqual (init_op1 .attr ('min' ), - 4.2 , delta = DELTA )
146
- self .assertAlmostEqual (init_op1 .attr ('max' ), 0.0 , delta = DELTA )
147
- self .assertEqual (init_op1 .attr ('seed' ), 123 )
148
-
149
142
150
143
class TestNormalInitializer (unittest .TestCase ):
151
144
def test_normal_initializer_default_value (self ):
You can’t perform that action at this time.
0 commit comments