rxn.onmt_utils.torch_utils.set_num_threads
- rxn.onmt_utils.torch_utils.set_num_threads(n)[source]
Set the number of threads to be used by torch.
torch is imported within the function, and the function lives in its own file, because of errors occurring on the cluster in some cases if this was not the case.
- Parameters
n (
int) –- Return type
None