From d9c414029f62018b9d351af47500380f5b2f6311 Mon Sep 17 00:00:00 2001 From: ZheyuYe Date: Wed, 29 Jul 2020 23:07:10 +0800 Subject: [PATCH] fix transformer --- src/gluonnlp/models/transformer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gluonnlp/models/transformer.py b/src/gluonnlp/models/transformer.py index b6671b2faf..ea66e27b23 100644 --- a/src/gluonnlp/models/transformer.py +++ b/src/gluonnlp/models/transformer.py @@ -196,7 +196,7 @@ def __init__(self, bias_initializer=bias_initializer, dtype=self._dtype) attention_layout = 'NTK' if self._layout == 'NT' else 'TNK' - self.attention_cell =\ + self.self_attention =\ MultiHeadAttentionCell( query_units=self._units, num_heads=self._num_heads,