How to limit the number of CPUs used by PyTorch?

Hi,

You can use torch.set_num_threads() to do this.

4 Likes