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,
|
}.cmp,
|
||||||
self,
|
self,
|
||||||
Tensor.scalar(0, self.dtype()),
|
Tensor.constant(&.{}, self.dtype().minValue()),
|
||||||
&.{a},
|
&.{a},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -2272,7 +2272,7 @@ pub const Tensor = struct {
|
|||||||
}
|
}
|
||||||
}.cmp,
|
}.cmp,
|
||||||
self,
|
self,
|
||||||
Tensor.scalar(0, self.dtype()),
|
Tensor.constant(&.{}, self.dtype().maxValue()),
|
||||||
&.{a},
|
&.{a},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user