I try to build an object detection model, as a part of Master's degree project.
When we work with neural networks - batch size is an important hyperparameter. From previous questions I learned, that each minibatch is randomly sampled without replacement from the dataset (https://stats.stackexchange.com/questions/235844/should-training-samples-randomly-drawn-for-mini-batch-training-neural-nets-be-dr).
However, I am uncertain about TFOD approach to minibatches:
- How does TFOD sample images from training data into a mini-batch? (random sampling without replacement?)
- What do we do, if we sampled without replacement, and reached the end of the dataset? Is the data repeated?
I was trying to look for the answer in the internal functions of TFOD framework, but found nothing than dataset_builder.build() function, that just builds the ready dataset, but is not responsible for batches sampling.
I would appreciate any thoughts! Thank you guys!
def build(
input_reader_config,
batch_size=None,
transform_input_data_fn=None,
input_context=None,
reduce_to_frame_fn=None,
):
"""Builds a tf.data.Dataset."""