Loss between tensors of different shape

I made 2 models with only convolutional layer to extract the feature maps of the images for siamese networks. I wanted to ask if there is a loss function or a way to calculate the loss between two feature maps of two different shapes for eg: [25,32,67,67] and [25,32,30,30].

Hi @sharjeel

The loss is a metric showing the difference between two distributions.
How would you compare a scalar to an array of size 10? You would have to compare the scalar against all the values of the array, or reduce the array to scalar.

Similarly, you will have to project the features into same shape tensors before being able to compare them with a loss function. In your use case, mean or average pooling should be the best.