7681e0305184eaf164069485003ab8c6e3e5e155,scripts/bert/finetune_classifier.py,,,#,48
Before Change
data_train = MRPCDataset("train").transform(trans)
data_dev = MRPCDataset("dev").transform(trans)
bert_dataloader = mx.gluon.data.DataLoader(data_train, batch_size=batch_size,
shuffle=True, last_batch="rollover")
bert_dataloader_dev = mx.gluon.data.DataLoader(data_dev, batch_size=test_batch_size,
shuffle=False)
def evaluate():
After Change
lr = args.lr
accumulate = args.accumulate
log_interval = args.log_interval * accumulate if accumulate else args.log_interval
if accumulate:
logging.info("Using gradient accumulation. Effective batch size = %d"%(accumulate*batch_size))
// random seed
np.random.seed(args.seed)
random.seed(args.seed)
mx.random.seed(args.seed)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: dmlc/gluon-nlp
Commit Name: 7681e0305184eaf164069485003ab8c6e3e5e155
Time: 2018-12-29
Author: linhaibin.eric@gmail.com
File Name: scripts/bert/finetune_classifier.py
Class Name:
Method Name:
Project Name: HsinYingLee/DRIT
Commit Name: 8776ca2dcfa98412a6dafc33d360ee1ba0d1b551
Time: 2018-07-25
Author: james371507@gmail.com
File Name: src/test.py
Class Name:
Method Name: main
Project Name: jadore801120/attention-is-all-you-need-pytorch
Commit Name: 15b19130a9162feb9153a2f38c5c8b0af02c6a1d
Time: 2018-08-21
Author: yhhuang@nlg.csie.ntu.edu.tw
File Name: train.py
Class Name:
Method Name: main