Add drop_last arg for data loader

This commit is contained in:
Setu Shah
2020-06-03 22:25:08 -07:00
committed by Julien Chaumond
parent 48a05026de
commit 0e1869cc28
2 changed files with 6 additions and 0 deletions

View File

@@ -133,6 +133,10 @@ class TrainingArguments:
)
tpu_metrics_debug: bool = field(default=False, metadata={"help": "TPU: Whether to print debug metrics"})
dataloader_drop_last: bool = field(
default=False, metadata={"help": "Drop the last incomplete batch if it is not divisible by the batch size."}
)
@property
def train_batch_size(self) -> int:
if self.per_gpu_train_batch_size: