bert icon indicating copy to clipboard operation
bert copied to clipboard

The feature of bidirection

Open lizaigaoge550 opened this issue 8 years ago • 1 comments

i want to know where to apply the characteristic of bidirection in modeling.py. Thank you very much.

lizaigaoge550 avatar Nov 08 '18 03:11 lizaigaoge550

Transformers are bidirectional by default. To make them unidirectional a special attention mask needs to be applied. So the self-attention part of the transformer is where the bidirectionality comes in.

jacobdevlin-google avatar Nov 08 '18 18:11 jacobdevlin-google