romilbert / samformer

Official implementation of SAMformer, a transformer leveraging Sharpness-Aware Minimization and Channel-Wise Attention for Time Series Forecasting.
MIT License
130 stars 18 forks source link

How to obtain the visualization results of attention? #11

Closed ZYBOBO closed 3 months ago

romilbert commented 3 months ago

To visualize the attention matrices, you can plot the output of get_last_attention_weights. You'll get one matrix per batch element.

ambroiseodt commented 3 months ago

Thanks for your question, it is planned to release the code to visualize the main figure of the paper. It should happen within 1-2 months, stay tuned :)

Best