I have a doubt; I was using OCAB type of block in my implementation.But there is an issue if the image size is not divisible by 8; hence it is resulting in reshaping errors.
For example:
einops.EinopsError: Error while processing rearrange-reduction pattern "b c (h p1) (w p2) -> (b h w) (p1 p2) c".
Input tensor shape: torch.Size([1, 64, 84, 128]). Additional info: {'p1': 8, 'p2': 8}.
Shape mismatch, can't divide axis of length 84 in chunks of 8
You need to make sure that your image size can be divisible by the window_size parameter in OCAB, otherwise, it won't work. You can try to pad or resize your image to a suitable size.
I have a doubt; I was using OCAB type of block in my implementation.But there is an issue if the image size is not divisible by 8; hence it is resulting in reshaping errors. For example: einops.EinopsError: Error while processing rearrange-reduction pattern "b c (h p1) (w p2) -> (b h w) (p1 p2) c". Input tensor shape: torch.Size([1, 64, 84, 128]). Additional info: {'p1': 8, 'p2': 8}. Shape mismatch, can't divide axis of length 84 in chunks of 8