You could probably use unfold
to get the image patches and calculate the loss on these.
Have a look at this post for an example.
1 Like
You could probably use unfold
to get the image patches and calculate the loss on these.
Have a look at this post for an example.