@@ -123,7 +123,7 @@ def run(place):
123123 index = paddle .static .data ('Index' , self .index_shape , "int64" )
124124 value = paddle .static .data ('Value' , self .value_shape )
125125 out = paddle .scatter_reduce (
126- x , self .axis , index , value , "sum" , False
126+ x , self .axis , index , value , "sum" , include_self = False
127127 )
128128 exe = paddle .static .Executor (self .place [0 ])
129129 res = exe .run (
@@ -160,7 +160,12 @@ def run(place):
160160 index_tensor = paddle .to_tensor (self .index_np )
161161 value_tensor = paddle .to_tensor (self .value_np )
162162 out = paddle .scatter_reduce (
163- x_tensor , self .axis , index_tensor , value_tensor , "sum" , False
163+ x_tensor ,
164+ self .axis ,
165+ index_tensor ,
166+ value_tensor ,
167+ "sum" ,
168+ include_self = False ,
164169 )
165170 nums = np .zeros_like (self .x_np )
166171 target = copy .deepcopy (self .x_np )
@@ -274,7 +279,7 @@ def run(place):
274279 index = paddle .static .data ('Index' , self .index_shape , "int64" )
275280 value = paddle .static .data ('Value' , self .value_shape )
276281 out = paddle .scatter_reduce (
277- x , self .axis , index , value , "prod" , False
282+ x , self .axis , index , value , "prod" , include_self = False
278283 )
279284 exe = paddle .static .Executor (self .place [0 ])
280285 res = exe .run (
@@ -311,7 +316,12 @@ def run(place):
311316 index_tensor = paddle .to_tensor (self .index_np )
312317 value_tensor = paddle .to_tensor (self .value_np )
313318 out = paddle .scatter_reduce (
314- x_tensor , self .axis , index_tensor , value_tensor , "prod" , False
319+ x_tensor ,
320+ self .axis ,
321+ index_tensor ,
322+ value_tensor ,
323+ "prod" ,
324+ include_self = False ,
315325 )
316326 nums = np .zeros_like (self .x_np )
317327 target = copy .deepcopy (self .x_np )
@@ -436,7 +446,7 @@ def run(place):
436446 index = paddle .static .data ('Index' , self .index_shape , "int64" )
437447 value = paddle .static .data ('Value' , self .value_shape )
438448 out = paddle .scatter_reduce (
439- x , self .axis , index , value , "mean" , False
449+ x , self .axis , index , value , "mean" , include_self = False
440450 )
441451 exe = paddle .static .Executor (self .place [0 ])
442452 res = exe .run (
@@ -478,7 +488,12 @@ def run(place):
478488 index_tensor = paddle .to_tensor (self .index_np )
479489 value_tensor = paddle .to_tensor (self .value_np )
480490 out = paddle .scatter_reduce (
481- x_tensor , self .axis , index_tensor , value_tensor , "mean" , False
491+ x_tensor ,
492+ self .axis ,
493+ index_tensor ,
494+ value_tensor ,
495+ "mean" ,
496+ include_self = False ,
482497 )
483498 nums = np .zeros_like (self .x_np )
484499 target = copy .deepcopy (self .x_np )
@@ -601,7 +616,7 @@ def run(place):
601616 index = paddle .static .data ('Index' , self .index_shape , "int64" )
602617 value = paddle .static .data ('Value' , self .value_shape )
603618 out = paddle .scatter_reduce (
604- x , self .axis , index , value , "amin" , False
619+ x , self .axis , index , value , "amin" , include_self = False
605620 )
606621 exe = paddle .static .Executor (self .place [0 ])
607622 res = exe .run (
@@ -640,7 +655,12 @@ def run(place):
640655 index_tensor = paddle .to_tensor (self .index_np )
641656 value_tensor = paddle .to_tensor (self .value_np )
642657 out = paddle .scatter_reduce (
643- x_tensor , self .axis , index_tensor , value_tensor , "amin" , False
658+ x_tensor ,
659+ self .axis ,
660+ index_tensor ,
661+ value_tensor ,
662+ "amin" ,
663+ include_self = False ,
644664 )
645665
646666 target = copy .deepcopy (self .x_np )
@@ -759,7 +779,7 @@ def run(place):
759779 index = paddle .static .data ('Index' , self .index_shape , "int64" )
760780 value = paddle .static .data ('Value' , self .value_shape )
761781 out = paddle .scatter_reduce (
762- x , self .axis , index , value , "amax" , False
782+ x , self .axis , index , value , "amax" , include_self = False
763783 )
764784 exe = paddle .static .Executor (self .place [0 ])
765785 res = exe .run (
@@ -797,7 +817,12 @@ def run(place):
797817 index_tensor = paddle .to_tensor (self .index_np )
798818 value_tensor = paddle .to_tensor (self .value_np )
799819 out = paddle .scatter_reduce (
800- x_tensor , self .axis , index_tensor , value_tensor , "amax" , False
820+ x_tensor ,
821+ self .axis ,
822+ index_tensor ,
823+ value_tensor ,
824+ "amax" ,
825+ include_self = False ,
801826 )
802827
803828 target = copy .deepcopy (self .x_np )
0 commit comments