Tensor2tensor: Attention visualization

Created on 12 Jul 2017  路  7Comments  路  Source: tensorflow/tensor2tensor

Hi,

in the appendix of Attention Is All You Need some very nice visualizations of the attention mechanism can be seen.

How can I create those visualizations for my own dataset/language pair?

Would be great if the authors can give some hints :)

Most helpful comment

LLion, who wrote the scripts to do the visualizations, is on vacation this week. I'll leave this open and ping when he's back.

All 7 comments

LLion, who wrote the scripts to do the visualizations, is on vacation this week. I'll leave this open and ping when he's back.

@lukaszkaiser That would be great :)

@lukaszkaiser I too will wait for this. Thanks very much for the guidance

It seems that dot_product_attention (which is used in multihead_attention which is used in the Transformer) calls attention_image_summary which adds an image summary op, which should be written out to TensorBoard during training. Have you checked the image summaries tab in TensorBoard during training?

I meant these kind of visualizations:

visu

:)

An iPython notebook with our viz code is included in the new release 1.2.0, give it a try!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

activatedgeek picture activatedgeek  路  4Comments

kaushalshetty picture kaushalshetty  路  3Comments

peblair picture peblair  路  4Comments

goodmansasha picture goodmansasha  路  4Comments

KayShenClarivate picture KayShenClarivate  路  3Comments