Kevin Fink commited on
Commit
afdaed1
·
1 Parent(s): bab0771
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -69,12 +69,13 @@ def fine_tune_model(model_name, dataset_name, hub_id, api_key, num_epochs, batch
69
  output_dir='./results',
70
  eval_strategy="steps", # Change this to steps
71
  save_strategy='steps',
72
- learning_rate=lr*0.000001,
73
  per_device_train_batch_size=int(batch_size),
74
  per_device_eval_batch_size=int(batch_size),
75
  num_train_epochs=int(num_epochs),
76
  weight_decay=0.01,
77
- #gradient_accumulation_steps=int(grad),
 
78
  load_best_model_at_end=True,
79
  metric_for_best_model="accuracy",
80
  greater_is_better=True,
 
69
  output_dir='./results',
70
  eval_strategy="steps", # Change this to steps
71
  save_strategy='steps',
72
+ learning_rate=lr*0.00001,
73
  per_device_train_batch_size=int(batch_size),
74
  per_device_eval_batch_size=int(batch_size),
75
  num_train_epochs=int(num_epochs),
76
  weight_decay=0.01,
77
+ gradient_accumulation_steps=int(grad),
78
+ max_grad_norm = 1.0,
79
  load_best_model_at_end=True,
80
  metric_for_best_model="accuracy",
81
  greater_is_better=True,