From d08a338c3bbe9964a4d44e5bdb15a45e985256c0 Mon Sep 17 00:00:00 2001 From: Yohei Tamura Date: Sat, 16 Nov 2019 18:47:37 +0900 Subject: [PATCH] modified: transformers/modeling_utils.py --- transformers/modeling_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transformers/modeling_utils.py b/transformers/modeling_utils.py index d51eefab58..e7fd593bce 100644 --- a/transformers/modeling_utils.py +++ b/transformers/modeling_utils.py @@ -728,7 +728,7 @@ class SequenceSummary(nn.Module): def __init__(self, config): super(SequenceSummary, self).__init__() - self.summary_type = config.summary_type if hasattr(config, 'summary_use_proj') else 'last' + self.summary_type = config.summary_type if hasattr(config, 'summary_type') else 'last' if self.summary_type == 'attn': # We should use a standard multi-head attention module with absolute positional embedding for that. # Cf. https://github.com/zihangdai/xlnet/blob/master/modeling.py#L253-L276