asahi417 commited on
Commit
e9bf213
1 Parent(s): bde7d96

Update lm_finetuning.py

Browse files
Files changed (1) hide show
  1. lm_finetuning.py +6 -2
lm_finetuning.py CHANGED
@@ -156,8 +156,12 @@ def main():
156
  eval_dataset=tokenized_datasets[opt.split_validation],
157
  compute_metrics=compute_metric_search,
158
  model_init=lambda x: AutoModelForSequenceClassification.from_pretrained(
159
- opt.model, return_dict=True, num_labels=len(dataset[opt.split_train]['label'][0])),
160
- id2label=ID2LABEL, label2id=LABEL2ID,
 
 
 
 
161
  )
162
  # parameter search
163
  if PARALLEL:
 
156
  eval_dataset=tokenized_datasets[opt.split_validation],
157
  compute_metrics=compute_metric_search,
158
  model_init=lambda x: AutoModelForSequenceClassification.from_pretrained(
159
+ opt.model,
160
+ return_dict=True,
161
+ num_labels=len(dataset[opt.split_train]['label'][0])
162
+ id2label=ID2LABEL,
163
+ label2id=LABEL2ID
164
+ )
165
  )
166
  # parameter search
167
  if PARALLEL: