Spaces:
Runtime error
Runtime error
AnnaPalatkina
commited on
Commit
·
a78c573
1
Parent(s):
92cb663
finetuning
Browse files- fine_tune.py +1 -3
fine_tune.py
CHANGED
@@ -203,9 +203,7 @@ for epoch in range(epochs):
|
|
203 |
print(f'Train loss -- {train_loss} -- accuracy {train_acc} -- f1 {train_f1}')
|
204 |
|
205 |
# save model
|
206 |
-
|
207 |
-
model_name = args.model.split('/')[-1] if args.model.split('/')[-1] != '' else args.model.split('/')[-2]
|
208 |
-
|
209 |
torch.save(model.state_dict(),f'saved_models/{model_name}_epoch_{epochs}.bin')
|
210 |
|
211 |
val_acc, val_loss, val_f1, report = eval_model(
|
|
|
203 |
print(f'Train loss -- {train_loss} -- accuracy {train_acc} -- f1 {train_f1}')
|
204 |
|
205 |
# save model
|
206 |
+
model_name = args.model.split('/')[-1] if args.model.split('/')[-1] != '' else args.model.split('/')[-2]
|
|
|
|
|
207 |
torch.save(model.state_dict(),f'saved_models/{model_name}_epoch_{epochs}.bin')
|
208 |
|
209 |
val_acc, val_loss, val_f1, report = eval_model(
|