解决Warning: Leaking Caffe2 thread-pool after fork

问题:使用pytorch中dataloader时出现警告:

epoch 2:
[W pthreadpool-cpp.cc:88] Warning: Leaking Caffe2 thread-pool after fork. (function pthreadpool)
[W pthreadpool-cpp.cc:88] Warning: Leaking Caffe2 thread-pool after fork. (function pthreadpool)

解决:设置pin_memory=False

你可能感兴趣的:(Python,AI/ML/DL,python)