File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -255,10 +255,10 @@ def visitStepFunc(self, ctx):
255255 # N-argument functions
256256 def visitSMinFunc (self , ctx ):
257257 args = [self .visit (e ) for e in ctx .expr ()]
258- return torch .full ( self . shape , torch .min (torch .stack ( args )), device = self . device )
258+ return torch .min ( torch .stack (torch .broadcast_tensors ( * args )))
259259 def visitSMaxFunc (self , ctx ):
260- args = [torch . reshape ( self .visit (e ), self . shape ) for e in ctx .expr ()]
261- return torch .full ( self . shape , torch .max (torch .stack ( args )), device = self . device )
260+ args = [self .visit (e ) for e in ctx .expr ()]
261+ return torch .max ( torch .stack (torch .broadcast_tensors ( * args )))
262262
263263 def visitTMinFunc (self , ctx ):
264264 return torch .minimum (self .visit (ctx .expr (0 )),self .visit (ctx .expr (1 )))
You can’t perform that action at this time.
0 commit comments