Solved by Alexander_Soare in post #3 
              
              
                Thanks for your response! 
Well, I kind of feel like I got away with a crime, but this didn’t throw the error: 
patch_embed_rest = patch_embed[:, 1:]
patch_embed_rest += self.proj(self.norm1_proj(pixel_embed).reshape(B, N - 1, -1))