From 685e0a875167ebc8968e943624bdb04591d89a1b Mon Sep 17 00:00:00 2001 From: Mike Walmsley Date: Sat, 4 Nov 2023 10:17:53 -0400 Subject: [PATCH] increase prefetch factor --- zoobot/pytorch/training/webdatamodule.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zoobot/pytorch/training/webdatamodule.py b/zoobot/pytorch/training/webdatamodule.py index a359c635..6449af55 100644 --- a/zoobot/pytorch/training/webdatamodule.py +++ b/zoobot/pytorch/training/webdatamodule.py @@ -100,7 +100,8 @@ def make_loader(self, urls, mode="train"): batch_size=None, # already batched shuffle=False, # already shuffled num_workers=self.num_workers, - pin_memory=True + pin_memory=True, + prefetch_factor=10 ) # print('sampling')