various fixes

This commit is contained in:
thomwolf
2018-11-02 01:52:54 +01:00
parent 2c731fd129
commit dee09a40b2
2 changed files with 11 additions and 8 deletions

View File

@@ -412,7 +412,8 @@ class BertForSequenceClassification(nn.Module):
model = modeling.BertModel(config, num_labels)
logits = model(input_ids, token_type_ids, input_mask)
```
""" def __init__(self, config, num_labels):
"""
def __init__(self, config, num_labels):
super(BertForSequenceClassification, self).__init__()
self.bert = BertModel(config)
self.dropout = nn.Dropout(config.hidden_dropout_prob)