From fcb970760f239dc60f1f667f7ca616cb1acda97a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martyna=20Wi=C4=85cek?= <martyna.wiacek@ipipan.waw.pl> Date: Fri, 9 Feb 2024 17:46:55 +0100 Subject: [PATCH] added separate validation batches per epoch --- combo/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/combo/main.py b/combo/main.py index 256e75a..bbf22b0 100755 --- a/combo/main.py +++ b/combo/main.py @@ -63,6 +63,8 @@ flags.DEFINE_integer(name="batch_size", default=256, help="Batch size") flags.DEFINE_integer(name="batches_per_epoch", default=16, help="Number of batches per epoch") +flags.DEFINE_integer(name="validation_batches_per_epoch", default=4, + help="Number of batches per epoch") flags.DEFINE_string(name="pretrained_transformer_name", default="bert-base-cased", help="Pretrained transformer model name (see transformers from HuggingFace library for list of " "available models) for transformers based embeddings.") @@ -170,7 +172,7 @@ def get_defaults(dataset_reader: Optional[DatasetReader], str(training_data_loader.data_path), prefix=prefix) if FLAGS.validation_data_path and not validation_data_loader: - validation_data_loader = default_data_loader(dataset_reader, validation_data_path, FLAGS.batch_size, FLAGS.batches_per_epoch) + validation_data_loader = default_data_loader(dataset_reader, validation_data_path, FLAGS.batch_size, FLAGS.validation_batches_per_epoch) elif FLAGS.validation_data_path and validation_data_loader: if validation_data_path: validation_data_loader.data_path = validation_data_path -- GitLab