Skip to content

Commit

Permalink
Change to using token classification model.
Browse files Browse the repository at this point in the history
  • Loading branch information
zmgong committed Dec 17, 2024
1 parent 60b64c6 commit 7b62c5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bioscanclip/model/dna_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def load_pre_trained_bioscan_bert_trained_with_5m(bioscan_bert_checkpoint, k=4):
ckpt = torch.load(bioscan_bert_checkpoint, map_location=device)
model_ckpt = remove_extra_pre_fix(ckpt["model"])
bert_config = BertConfig(**ckpt["bert_config"])
model = BertForMaskedLM(bert_config)
model = BertForTokenClassification(bert_config)
model.load_state_dict(model_ckpt)
return model.to(device)

Expand Down

0 comments on commit 7b62c5e

Please sign in to comment.