Ejemplo n.º 1
0
# =========================================================================================

classifier = mdl_res34_localpool()

classifier.load_state_dict(
    torch.load(
        'mdl_res34localpool_168168_lessaugs_mucm_fixed_adam_onecycle_fld3of5_backup.pth'
    ))

learn = Learner(data_bunch,
                classifier,
                loss_func=Loss_combine_weighted_v2(),
                opt_func=Adam,
                metrics=[
                    Metric_grapheme(),
                    Metric_vowel(),
                    Metric_consonant(),
                    Metric_tot()
                ])

# learn.clip_grad = 1.0
name = 'mdl_res34localpool_168168_lessaugs_mucm_fixed_adam_onecycle_fld3of5'

logger = CSVLogger(learn, name)

# =========================================================================================

# learn.fit_one_cycle(
#     100,
#     max_lr=0.001,
Ejemplo n.º 2
0
# In[7]:


classifier = Net()


# In[8]:


learn = Learner(
    data_bunch,
    classifier,
    loss_func=Loss_combine_weighted_v2(),
    opt_func=Over9000,
    metrics=[Metric_grapheme(), Metric_vowel(), Metric_consonant(), Metric_tot()]
)

name = 'new_baseline_hengs_LessAugs_211_Mu10_Wd0_fit160epochs'

logger = CSVLogger(learn, name)

# learn.unfreeze()


# In[ ]:


# learn.fit_one_cycle(
#     64,
#     max_lr=.01,
Ejemplo n.º 3
0
classifier = Simple50GeM_ArcFace_Single(n_classes=168)


# In[8]:


logging_name = 'Simple50GeM_AllMish_MoreAugs_Single_ArcFace_1of7'

learn = Learner(
    data_bunch,
    classifier,
    #loss_func=Loss_single(),
    loss_func=AdvancedLoss_Single(),
    opt_func=Over9000,
    metrics=[Metric_grapheme()]
)

logger = CSVLogger(learn, logging_name)

learn.clip_grad = 1.0
# learn.split([classifier.cls])
learn.unfreeze()


# In[9]:


learn.fit_one_cycle(
    64,
#     max_lr=slice(0.2e-2, 1e-2),