I'm trying to find the similarity between two 4D matrices. Because cosine similarity takes the dot product of the input matrices, the result is inevitably a matrix. Is there a way to get a scalar value instead? Could inner product used instead of dot product? That is, is
cossim(A,B) = inner(A,B) / (norm(A) * norm(B))
valid? Or is there a better way to find the similarity between multidimensional matrices?