File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
python/paddle/fluid/tests/unittests Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -252,5 +252,25 @@ def init_axis(self):
252
252
self .axis = 1
253
253
254
254
255
+ class TestElementwiseAddOp_channelwise_add (TestElementwiseAddOp ):
256
+ def init_input_output (self ):
257
+ self .x = np .random .rand (3 , 20 , 20 ).astype (self .dtype )
258
+ self .y = np .random .rand (3 , 1 , 1 ).astype (self .dtype )
259
+ self .out = self .x + self .y
260
+
261
+ def init_axis (self ):
262
+ self .axis = - 1
263
+
264
+
265
+ class TestFP16ElementwiseAddOp_channelwise_add (TestFP16ElementwiseAddOp ):
266
+ def init_input_output (self ):
267
+ self .x = np .random .rand (3 , 10 , 20 ).astype (self .dtype )
268
+ self .y = np .random .rand (3 , 1 , 1 ).astype (self .dtype )
269
+ self .out = self .x + self .y
270
+
271
+ def init_axis (self ):
272
+ self .axis = - 1
273
+
274
+
255
275
if __name__ == '__main__' :
256
276
unittest .main ()
You can’t perform that action at this time.
0 commit comments