From a4da4092e8c50c9f2ab3389c041e073d0d6fcd98 Mon Sep 17 00:00:00 2001 From: Tanay Soni Date: Mon, 5 Aug 2019 14:54:14 +0200 Subject: [PATCH] Fix use of list in batch_size config (#38) The lists in configs are converted to numpy arrays. The batch_size argument is now type casted to the Python `int` type. --- farm/experiment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/farm/experiment.py b/farm/experiment.py index 0ce969c44..84f39cbe0 100644 --- a/farm/experiment.py +++ b/farm/experiment.py @@ -48,7 +48,7 @@ def run_experiment(args): use_cuda=args.cuda, local_rank=args.local_rank, fp16=args.fp16 ) - args.batch_size = args.batch_size // args.gradient_accumulation_steps + args.batch_size = int(args.batch_size // args.gradient_accumulation_steps) if n_gpu > 1: args.batch_size = args.batch_size * n_gpu set_all_seeds(args.seed)