AdaFace
AdaFace copied to clipboard
What does --numworkers do?
What does --numworkers do?
--num_workers will set the corresponding property of the Dataloaders. You can check its exact purpose within the torch documentation. It basically sets the number of threads used by the Dataloaders.
--num_workers will set the corresponding property of the Dataloaders. You can check its exact purpose within the torch documentation. It basically sets the number of threads used by the Dataloaders.
So setting them as the ammount of cpu cores is a good choice?
You indeed should take the number of cpus into consideration (I often limit the number of workers a bit lower than the total of available cpus in case some operations are using multithreading) , but also the amount of ram. I have no heuristics to find the right number of workers given the amount of memory, but you will have memory errors if the number of workers is too high, so I just make tests until it works.