mirror of
https://github.com/wassname/multifit.git
synced 2026-10-29 13:20:17 +08:00
Add F1 metrics to evaluate
This commit is contained in:
1 parent
a948d7df91
commit
8facc21cfa
2 files changed
+3
-4
No files matched your search
@@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
LANGS
|
||||
for
|
||||
@@ -110,6 +110,9 @@ class CLSHyperParams(LMHyperParams):
|
||||
learn = self.create_cls_learner(data_tst, drop_mult=0.3, label_smoothing_eps=label_smoothing_eps)
|
||||
learn.unfreeze()
|
||||
learn.load(save_name)
|
||||
f1 = FBeta(beta=1, average='binary')
|
||||
f1.on_train_begin()
|
||||
learn.metrics += [f1]
|
||||
val_res=[-1, -1]
|
||||
if data_cls:
|
||||
val_res = learn.validate(data_cls.valid_dl)
|
||||
|
||||
Reference in new issue
Block a user