Skip to content

Commit

Permalink
update experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip1435 committed Mar 8, 2024
1 parent f76bacf commit 1f70493
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion experiments/02_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,13 @@
" \"distilbert/distilbert-base-uncased\", num_labels=2, id2label=id2label, label2id=label2id\n",
")\n",
"\n",
"tokenizer = AutoTokenizer.from_pretrained(\"distilbert/distilbert-base-uncased\")"
"tokenizer = AutoTokenizer.from_pretrained(\"distilbert/distilbert-base-uncased\")\n",
"\n",
"for param in model.distilbert.parameters():\n",
" param.requires_grad = False\n",
"\n",
"for param in model.classifier.parameters():\n",
" param.requires_grad = True"
]
},
{
Expand Down

0 comments on commit 1f70493

Please sign in to comment.