Skip to content

Commit

Permalink
add experiment 7 & 8
Browse files Browse the repository at this point in the history
experiment 7: same as experiment 6 starting from epoch 49 and going to epoch 100
experiment 8: same as experiment 5 but w/ efficientnet b6, 60 epochs
  • Loading branch information
MichelML committed Aug 17, 2019
1 parent d44ed22 commit adaa5a9
Show file tree
Hide file tree
Showing 8 changed files with 2,127 additions and 8 deletions.
1 change: 0 additions & 1 deletion .floydignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ var
*.pyc
*.swp
.DS_Store
models
6 changes: 3 additions & 3 deletions experiment6.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
"metadata": {},
"outputs": [],
"source": [
"handler = EarlyStopping(patience=50, score_function=lambda engine: engine.state.metrics['accuracy'], trainer=trainer)\n",
"handler = EarlyStopping(patience=30, score_function=lambda engine: engine.state.metrics['accuracy'], trainer=trainer)\n",
"val_evaluator.add_event_handler(Events.COMPLETED, handler)"
]
},
Expand All @@ -272,7 +272,7 @@
"metadata": {},
"outputs": [],
"source": [
"scheduler = CosineAnnealingScheduler(optimizer, 'lr', 3e-4, 1e-7, len(loader))\n",
"scheduler = CosineAnnealingScheduler(optimizer, 'lr', 2e-4, 1e-7, len(loader))\n",
"trainer.add_event_handler(Events.ITERATION_STARTED, scheduler)\n",
"\n",
"@trainer.on(Events.ITERATION_COMPLETED)\n",
Expand Down Expand Up @@ -439,7 +439,7 @@
],
"source": [
"print('Training started\\n')\n",
"trainer.run(loader, max_epochs=50)"
"trainer.run(loader, max_epochs=120)"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions experiment6.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def forward(self, x1, x2):
# In[8]:


handler = EarlyStopping(patience=50, score_function=lambda engine: engine.state.metrics['accuracy'], trainer=trainer)
handler = EarlyStopping(patience=30, score_function=lambda engine: engine.state.metrics['accuracy'], trainer=trainer)
val_evaluator.add_event_handler(Events.COMPLETED, handler)


Expand All @@ -197,7 +197,7 @@ def forward(self, x1, x2):
# In[9]:


scheduler = CosineAnnealingScheduler(optimizer, 'lr', 3e-4, 1e-7, len(loader))
scheduler = CosineAnnealingScheduler(optimizer, 'lr', 2e-4, 1e-7, len(loader))
trainer.add_event_handler(Events.ITERATION_STARTED, scheduler)

@trainer.on(Events.ITERATION_COMPLETED)
Expand Down Expand Up @@ -280,7 +280,7 @@ def save_best_epoch_only(engine):


print('Training started\n')
trainer.run(loader, max_epochs=50)
trainer.run(loader, max_epochs=120)


# #### Evaluate
Expand Down
Loading

0 comments on commit adaa5a9

Please sign in to comment.