e6b394f7340cbeee16bf4424cdf0367f80b60619,code/deep/finetune_AlexNet_ResNet/office31.py,,,#,112
Before Change
for e in tqdm(range(1, N_EPOCH + 1)):
tqdm.write("learning rate: " + str(lrs))
optimizer = get_optimizer(model_name,learning_rate=lrs)
train(e, model, optimizer, data_src)
test(e, model, data_tar)
lrs = lr_decay(1e-4, N_EPOCH, e)
After Change
torch.manual_seed(10)
// Load data
root_dir = "data/OFFICE31/"
domain = {"src": "amazon", "tar": "webcam"}
dataloaders = {x: data_loader.load_data(root_dir, domain[x], BATCH_SIZE[x], x) for x in ["src", "tar"]}
// Load model
model_name = str(args.model)
model = load_model(model_name).to(DEVICE)
print("Source:{}, target:{}, model: {}".format(domain["src"], domain["tar"], model_name))
optimizer = get_optimizer(model_name)
model_best, best_acc, acc_hist = finetune(model, dataloaders, optimizer)
print("{}Best acc: {}".format("*" * 10, best_acc))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 14
Instances
Project Name: jindongwang/transferlearning
Commit Name: e6b394f7340cbeee16bf4424cdf0367f80b60619
Time: 2018-12-22
Author: jindongwang@outlook.com
File Name: code/deep/finetune_AlexNet_ResNet/office31.py
Class Name:
Method Name:
Project Name: jindongwang/transferlearning
Commit Name: e6b394f7340cbeee16bf4424cdf0367f80b60619
Time: 2018-12-22
Author: jindongwang@outlook.com
File Name: code/deep/finetune_AlexNet_ResNet/office31.py
Class Name:
Method Name:
Project Name: HyperGAN/HyperGAN
Commit Name: 9851098114134395edc8eb3a858a49bb25f95587
Time: 2017-07-12
Author: mikkel@255bits.com
File Name: examples/chargan.py
Class Name:
Method Name:
Project Name: HyperGAN/HyperGAN
Commit Name: 2c492adcec2019dac14f96a7186e2bf145a3a823
Time: 2017-08-22
Author: martyn.garcia@gmail.com
File Name: examples/chargan.py
Class Name:
Method Name: