I don’t know how common the reported shapes are in your model, but you could try to check the shapes of all intermediate tensors to narrow down the operation(s) which might be failing. It also seems you are using a 3rd party library for rearrange?