mirror of
https://github.com/ROCm/jax.git
synced 2025-04-19 05:16:06 +00:00
Add defensive tuple() in lax.reduce_window (#3741)
This commit is contained in:
parent
3c6cd5fb94
commit
6017205cea
@ -1123,6 +1123,8 @@ def reduce_window(operand: Array, init_value: Array, computation: Callable,
|
||||
if isinstance(padding, str):
|
||||
padding = padtype_to_pads(operand.shape, window_dimensions,
|
||||
window_strides, padding)
|
||||
else:
|
||||
padding = tuple(padding)
|
||||
monoid_reducer = _get_monoid_window_reducer(computation, init_value)
|
||||
if monoid_reducer:
|
||||
return monoid_reducer(operand, window_dimensions, window_strides, padding)
|
||||
|
Loading…
x
Reference in New Issue
Block a user