-
Running into an obscure error when trying to use lax.dynamic_slice: TypeError: broadcast_in_dim broadcast_dimensions must have length equal to operand ndim; got broadcast_dimensions (0,) for operand ndim 2.
filter_radius is static, y and x are not which is permitted according to the lax.dynamic_slice documentation. img_pad is 2D and I have tuples of length 2 for start_indices and start_sizes. I'm not sure what the broadcast_dimensions = (0,) is referring to? Short reproduction notebook here. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Another quirk I noticed is that when I return 1 inside compute(...), the returned shape is (5,) vs. the (15, 15) that I'm mapping over with vmap, which I've never run into before. |
Beta Was this translation helpful? Give feedback.
-
My mistake - needed to do another vmap within the first one. |
Beta Was this translation helpful? Give feedback.
My mistake - needed to do another vmap within the first one.