Conditional GAN loss issue

I want to calculate the loss between two images that are
``

But the problem is that:
x shape is [128, 11, 28, 28] and x’ shape is [128,1,28,28].
``
How can I calculate the loss between these two images?

Any help would be appriciated.

You could broadcast the second tensor to the same shape as the first one and could then apply e.g. nn.MSELoss. The right approach depends on the actual use case and the desired loss function, i.e. since both tensors have a different shape, what should the loss represent?

Thanks I was thinking the same