From c0d388011d4180fa62c8647b9ae92ddb8c6ac12a Mon Sep 17 00:00:00 2001 From: tink2123 Date: Thu, 6 May 2021 16:37:15 +0800 Subject: [PATCH] update for paddle2.1 --- ppocr/modeling/heads/self_attention.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ppocr/modeling/heads/self_attention.py b/ppocr/modeling/heads/self_attention.py index 4e96e4a4..6c27fdbe 100644 --- a/ppocr/modeling/heads/self_attention.py +++ b/ppocr/modeling/heads/self_attention.py @@ -319,9 +319,7 @@ class PrepareEncoder(nn.Layer): self.src_emb_dim = src_emb_dim self.src_max_len = src_max_len self.emb = paddle.nn.Embedding( - num_embeddings=self.src_max_len, - embedding_dim=self.src_emb_dim, - sparse=True) + num_embeddings=self.src_max_len, embedding_dim=self.src_emb_dim) self.dropout_rate = dropout_rate def forward(self, src_word, src_pos): -- GitLab