This commit is contained in:
thomwolf 2019-06-18 17:06:31 +02:00
parent 92e0ad5aba
commit 16a1f338c4
1 changed files with 4 additions and 4 deletions

View File

@ -222,6 +222,10 @@ def main():
elif n_gpu > 1:
model = torch.nn.DataParallel(model)
global_step = 0
nb_tr_steps = 0
tr_loss = 0
if args.do_train:
if args.local_rank in [-1, 0]:
tb_writer = SummaryWriter()
@ -293,10 +297,6 @@ def main():
warmup=args.warmup_proportion,
t_total=num_train_optimization_steps)
global_step = 0
nb_tr_steps = 0
tr_loss = 0
logger.info("***** Running training *****")
logger.info(" Num examples = %d", len(train_examples))
logger.info(" Batch size = %d", args.train_batch_size)