How to get the correlation result of two feature maps in Pytorch?

How to get the correlation result of two feature maps in Pytorch ?

a coarse metric is to take their dot product