Created
December 29, 2017 08:15
-
-
Save groverpr/4f7528a52ac20a8db641c8fdc1e71eb5 to your computer and use it in GitHub Desktop.
fitting model cf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # n_users: count unique users (671), n_movies: count unique movies (9066) | |
| model = EmbeddingNet(n_users, n_movies) | |
| # model.parameters() for back-propagation of weights | |
| # lr = 1e-3, weight decay = 1e-5 and using adam optimizer | |
| opt = optim.Adam(model.parameters(), 1e-3, weight_decay=1e-5) | |
| # fitting model, | |
| fit(model, data, 3, opt, F.mse_loss) | |
| # learning rate annealing (for more, check links at the end) | |
| set_lrs(opt, 1e-3) | |
| fit(model, data, 3, opt, F.mse_loss) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment