Skip to content

Instantly share code, notes, and snippets.

@vaibhavkumar049
Created June 8, 2019 20:10
Show Gist options
  • Save vaibhavkumar049/a4393efd050083d2c703c4611b29d595 to your computer and use it in GitHub Desktop.
Save vaibhavkumar049/a4393efd050083d2c703c4611b29d595 to your computer and use it in GitHub Desktop.
device = torch.device("cuda")
X_train=X_train.to(device)
Y_train=Y_train.to(device)
fn = FirstNetwork_v2()
fn.to(device)
tic = time.time()
print('Final loss', fit_v2(X_train, Y_train, fn, opt, loss_fn))
toc = time.time()
print('Time taken', toc - tic)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment