mems initialized to None in run_transfo

This commit is contained in:
thomwolf 2019-02-09 16:12:19 +01:00
parent cfcb95417c
commit 43b9af0cac

View File

@ -100,7 +100,7 @@ def main():
total_len, total_loss = 0, 0.
start_time = time.time()
with torch.no_grad():
mems = tuple()
mems = None
for idx, (data, target, seq_len) in enumerate(eval_iter):
ret = model(data, target, *mems)
loss, mems = ret