It calculates two different attention weights between the two modal features.
it first computes a similarity matrix S ∈ R T ×N , where S ij denotes the similarity between frame featuref i and word featurew j .