receives a probability score, indicating the likelihood of it being the next token

in the output chord sequence. We include a few hyperparameters to further

improve this selection. For instance, we set the maximum number of repeated

chords to 2 and the maximum number of repeated silences also to 2. In case these

constraints are met, the chord with the second highest probability is selected.

4.1.4. Emotion matching Loss Function

In our proposed Affective Multimodel Transformer (AMT) architecture, the

total loss is calculated as the weighted sum of the loss related to chords, Lchord,

and the loss related to the emotion of the resulting chords, Lemo, as follows:

Ltotal = λLchord + (1 − λ)Lemo

where λ represents a weighting factor that determines the relative importance

of the two individual loss components in the total loss. First, the Lchord can be

calculated as the cross-entropy between the soft targets of the model estimated
Video2Music