Skip to content

Commit

Permalink
Remove pooling layer for TokenClassificationModel (#351)
Browse files Browse the repository at this point in the history
* add_pooling_layer

* Revert "add_pooling_layer"

This reverts commit 607c9cf.

* use BertModel::new_with_optional_pooler
- in BertForTokenClassification

---------

Co-authored-by: Mauro Sciancalepore <mauro.sciancalepore@treatwell.com>
  • Loading branch information
masc-it and Mauro Sciancalepore authored Apr 15, 2023
1 parent 2e5f4a9 commit b40adb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bert/bert_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ impl BertForTokenClassification {
{
let p = p.borrow();

let bert = BertModel::new(p / "bert", config);
let bert = BertModel::new_with_optional_pooler(p / "bert", config, false);
let dropout = Dropout::new(config.hidden_dropout_prob);
let num_labels = config
.id2label
Expand Down

0 comments on commit b40adb8

Please sign in to comment.