votes up 3

Cannot divide evenly the sizes of shapes (tuple(s1)) and (tuple(s2))

Package:
jax
github stars 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:
😲  Walkingbet is Android app that pays you real bitcoins for a walking. Withdrawable real money bonus is available now, hurry up! 🚶

Ways to fix

votes up 2 votes down

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.

Jul 28, 2022 mikelancastertech answer

Add a possible fix

Please authorize to post fix