Skip to content

Instantly share code, notes, and snippets.

@sadimanna
Created June 30, 2021 11:18
Show Gist options
  • Save sadimanna/8362f2d55d948095a351c3fd73bcfce1 to your computer and use it in GitHub Desktop.
Save sadimanna/8362f2d55d948095a351c3fd73bcfce1 to your computer and use it in GitHub Desktop.
tr_ep_loss = []
tr_ep_acc = []
val_ep_loss = []
val_ep_acc = []
min_val_loss = 100.0
EPOCHS = 10
num_cl = 10
dsoptimizer = torch.optim.SGD([params for params in dsmodel.parameters() if params.requires_grad],lr = 0.01, momentum = 0.9)
lr_scheduler = torch.optim.lr_scheduler.StepLR(dsoptimizer, step_size=1, gamma=0.98, last_epoch=-1, verbose = True)
loss_fn = nn.CrossEntropyLoss()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment