Hi! I am having the same issue using a model on iOS. I found this page 4 explaining the difference between the memory formats, and indicating a conversion method:
x = x.to(memory_format=torch.channels_last)
However, applying this to the model output does not help, as I am getting the same error:
required rank 4 tensor to use channels_last format
debug_handle:-1
Anybody encountered the same issue? I have no idea what am I doing wrong.