Merge pull request #545 from tink2123/fix_bug_for_srn

fix bug
This commit is contained in:
xiaoting 2020-08-17 13:34:54 +08:00 committed by GitHub
commit 5ee40948e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ class RecModel(object):
self.loss_type = global_params['loss_type']
self.image_shape = global_params['image_shape']
self.max_text_length = global_params['max_text_length']
if "num_heads" in params:
if "num_heads" in global_params:
self.num_heads = global_params["num_heads"]
else:
self.num_heads = None