Browse Source

add l2 norm.

master
wogong 5 years ago
parent
commit
5ee7f52eca
  1. 2
      core/train.py

2
core/train.py

@ -21,7 +21,7 @@ def train_dann(model, params, src_data_loader, tgt_data_loader, tgt_data_loader_
if not params.finetune_flag:
print("training non-office task")
optimizer = optim.SGD(model.parameters(), lr=params.lr, momentum=params.momentum)
optimizer = optim.SGD(model.parameters(), lr=params.lr, momentum=params.momentum, weight_decay=params.weight_decay)
else:
print("training office task")
parameter_list = [{

Loading…
Cancel
Save