Attention weights of an attention CANN
attention_weights.RdThe last block's attention from [CLS] to each feature token, per row of
newdata and head: where the model looked for each risk. Per row and
head the weights over the feature tokens and [CLS] itself sum to 1. A
diagnostic, not a decomposition of the prediction; averaged over a
segment's rows it shows which rating factors the model leans on there.
Arguments
- model
An attention_cann_model with at least one block.
- newdata
A data frame with the model's terms.