e6b394f7340cbeee16bf4424cdf0367f80b60619,code/deep/finetune_AlexNet_ResNet/office31.py,,,#,112
Before Change
model = load_model(model_name).to(DEVICE)
lrs = LEARNING_RATE
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)
After Change
// 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))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
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: shibing624/pycorrector
Commit Name: a5f63384ac283ea71ca2668963da77db00cafa46
Time: 2019-07-08
Author: 507153809@qq.com
File Name: pycorrector/rnn_lm/infer.py
Class Name:
Method Name: ppl
Project Name: home-assistant/home-assistant
Commit Name: 4ccedca3e5cbd98ad8149d5ebed45d37ad09225a
Time: 2015-09-12
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/device_tracker/__init__.py
Class Name: DeviceTracker
Method Name: __init__