Skip to content

Instantly share code, notes, and snippets.

@dpoulopoulos
Last active March 2, 2020 08:16
Show Gist options
  • Select an option

  • Save dpoulopoulos/70aacf5cfba04458a96415acdc8b0790 to your computer and use it in GitHub Desktop.

Select an option

Save dpoulopoulos/70aacf5cfba04458a96415acdc8b0790 to your computer and use it in GitHub Desktop.
Model definition.
# 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