2733bef356c53286d475a67476d88d4840923830,code/deep/finetune_AlexNet_ResNet/finetune_office31.py,,finetune,#,87
Before Change
criterion = nn.CrossEntropyLoss()
for epoch in range(1, N_EPOCH + 1):
// lr_schedule(optimizer, epoch)
print("Learning rate: {:.8f}".format(optimizer.param_groups[0]["lr"]))
print("Learning rate: {:.8f}".format(optimizer.param_groups[-1]["lr"]))
for phase in ["src", "val", "tar"]:
if phase == "src":
After Change
if phase == "val" and epoch_acc > best_acc:
stop = 0
best_acc = epoch_acc
torch.save(model.state_dict(), "model.pkl")
if stop >= args.early_stop:
break
print()
model.load_state_dict(torch.load("model.pkl"))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 2
Instances
Project Name: jindongwang/transferlearning
Commit Name: 2733bef356c53286d475a67476d88d4840923830
Time: 2020-09-30
Author: jindongwang@outlook.com
File Name: code/deep/finetune_AlexNet_ResNet/finetune_office31.py
Class Name:
Method Name: finetune
Project Name: hanxiao/bert-as-service
Commit Name: 2bfe5bfcec7759ae022b1a479411aa7d1b8401f1
Time: 2019-05-06
Author: zyn2122@gmail.com
File Name: example/example7.py
Class Name:
Method Name:
Project Name: jakeret/tf_unet
Commit Name: 56591b0d0cb7fefa258f0642ff64e6ff2054e44c
Time: 2016-08-16
Author: jakeret@phys.ethz.ch
File Name: scripts/launcher.py
Class Name:
Method Name: