Skip to content

Commit

Permalink
fixbug: batch_size
Browse files Browse the repository at this point in the history
  • Loading branch information
caopulan committed Jan 3, 2023
1 parent 92624f7 commit 4333561
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion training/encoder_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def configure_datasets(self):
train_batch_size = self.opts.batch_size // self.opts.gpu_num
test_batch_size = self.opts.test_batch_size // self.opts.gpu_num
assert self.opts.batch_size == train_batch_size * self.opts.gpu_num, 'Train batch size is not a multiple of gpu num.'
assert self.opts.batch_size == test_batch_size * self.opts.gpu_num, 'Test batch size is not a multiple of gpu num.'
assert self.opts.test_batch_size == test_batch_size * self.opts.gpu_num, 'Test batch size is not a multiple of gpu num.'
if self.opts.dist:
train_sampler = DistributedSampler(
self.train_dataset,
Expand Down

0 comments on commit 4333561

Please sign in to comment.