Last active
March 2, 2020 08:16
-
-
Save dpoulopoulos/70aacf5cfba04458a96415acdc8b0790 to your computer and use it in GitHub Desktop.
Model definition.
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
| # local | |
| net = SimpleCF(n_users, n_movies, factors=FACTORS, init=torch.nn.init.uniform_, | |
| a=0., b=.1, binary=True) | |
| objective = FlatBCELoss() | |
| optimizer = SGD(net.parameters(), lr=6e-2) | |
| device = 'cuda' if torch.cuda.is_available() else 'cpu' | |
| model = Step(net, objective, optimizer, conf_func=conf_func, device=device) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment