zml: initialize Tensor.min and Tensor.max reductions with proper extreme values to ensure correct results
This commit is contained in:
parent
be6328813d
commit
934acb35a8
@ -2257,7 +2257,7 @@ pub const Tensor = struct {
|
||||
}
|
||||
}.cmp,
|
||||
self,
|
||||
Tensor.scalar(0, self.dtype()),
|
||||
Tensor.constant(&.{}, self.dtype().minValue()),
|
||||
&.{a},
|
||||
);
|
||||
}
|
||||
@ -2272,7 +2272,7 @@ pub const Tensor = struct {
|
||||
}
|
||||
}.cmp,
|
||||
self,
|
||||
Tensor.scalar(0, self.dtype()),
|
||||
Tensor.constant(&.{}, self.dtype().maxValue()),
|
||||
&.{a},
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user