Skip to content

Instantly share code, notes, and snippets.

@Blaizzy
Last active May 5, 2020 16:38
Show Gist options
  • Select an option

  • Save Blaizzy/3f362ca2f9b6abbf77c4fb147eb2affa to your computer and use it in GitHub Desktop.

Select an option

Save Blaizzy/3f362ca2f9b6abbf77c4fb147eb2affa to your computer and use it in GitHub Desktop.
m = SrResnet(scale)
learner = Learner(data, m, opt_func= optim.Adam, wd=0.9)
learner.loss_func = F.mse_loss
#-----------------------
lr = 1e-4 # learning rate
cycles = 8 # cycle_len following the 1cycle policy
#-----------------------
learner.fit_one_cycle(cycles, lr, pct_start=0.9)
learner.show_results(rows=1, imgsize = 5) # shows the model input/prediction/ground-truth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment