- 本机window10

- linux服务器开启了多个进程

- Linux服务器占用大量CPU

- 在pytorch中提供了(http://pytorch.org/docs/master/multiprocessing.html)muliprocessing多进程管理,其中有Pool进程池、Process()等对进程进行管理,可能是我使用的方式不对,反正是没有什么效果。
- 然而最简单的也是最好的解决办法 :torch.set_num_threads(int thread) ,可以很好的解决windows问题,参考(http://pytorch.org/docs/master/torch.html#parallelism) 然而,在linux服务器上还是有一些问题的,export OMP_NUM_THREADS = 1 可以解决Linux问题。
相关文章:
-
2022-03-08
-
2021-12-25
-
2021-04-27
-
2022-12-23
-
2022-02-07
-
2021-05-27
-
2023-03-17
-
2021-10-18
猜你喜欢
-
2021-12-04
-
2022-12-23
-
2021-05-17
-
2022-12-23
-
2022-12-23
-
2022-12-23
相关资源
-
下载
2023-02-21
-
下载
2022-12-27
-
下载
2022-12-07