Cannot divide evenly the sizes of shapes (tuple(s1)) and (tuple(s2))
Package:
jax
14057
Exception Class:
InconclusiveDimensionOperation
Raise code
"""
contexts,
"""
sz1 = int(np.prod(s1))
sz2 = int(np.prod(s2))
if sz1 == 0 and sz2 == 0:
return 1
if sz1 % sz2:
raise InconclusiveDimensionOperation(f"Cannot divide evenly the sizes of shapes {tuple(s1)} and {tuple(s2)}")
return sz1 // sz2
def stride(self, d: DimSize, window_size: DimSize, window_stride: DimSize) -> DimSize:
"""(d - window_size) // window_stride + 1"""
return (d - window_size) // window_stride + 1
def dilate(self, d: DimSize, dilation: int) -> DimSize:
Links to the raise (1)
https://github.com/google/jax/blob/8aff0f7b179769949f5719c2bc2baf8aae84675a/jax/core.py#L1309Ways to fix
I told Jax to make a 512 by 853 image. It Failed
Error: cannot divide evenly the sizes of shapes (1, 128, 512, 853)
Because 512 and 853 both have to be dimensions of 128.
adjusting the size I told it to produce to 512, 896 eliminated the error.
Add a possible fix
Please authorize to post fix