Skip to content

Commit

Permalink
Fix use of list in batch_size config (#38)
Browse files Browse the repository at this point in the history
The lists in configs are converted to numpy arrays. The batch_size
argument is now type casted to the Python `int` type.
  • Loading branch information
tanaysoni committed Aug 5, 2019
1 parent 012e158 commit a4da409
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion farm/experiment.py
Expand Up @@ -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)
Expand Down

0 comments on commit a4da409

Please sign in to comment.