Created
June 30, 2021 11:18
-
-
Save sadimanna/8362f2d55d948095a351c3fd73bcfce1 to your computer and use it in GitHub Desktop.
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
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