attention_heatmap
- class aitoolbox.nlp.experiment_evaluation.attention_heatmap.AttentionHeatMap(attention_matrices, source_sentences, target_sentences, plot_save_dir)[source]
Bases:
AbstractBaseMetric
Neural attention heatmap plotting
- Parameters:
attention_matrices (numpy.array or list) – list of attention 2D matrices
source_sentences (list) – list of corresponding source sentence text tokens
target_sentences (list) – list of corresponding target sentence text tokens
plot_save_dir (str) – folder path on local drive where the plots should be saved