Attention visualization for Image to Latex

I am new to OpenNMT-py.
I was wondering if there is a way to visualize the attention in Image to Latex conversion just like this.

not really out of the box.

You would need to wor on the attention output but for image this is not easy.