记录Pytorch问题的解决方案

问题:Warning: Leaking Caffe2 thread-pool after fork. (function pthreadpool)

方案1:将dataset中的属性num_workers设置为1,同时将属性pin_memory设置为False;

方案2:调小batch_size的值,如当前batch_size的值为256,将其调整为64,若仍出现该问题,继续将batch_size的值调小。(该方案为实验时得出的总结,不一定可行。)

你可能感兴趣的:(神经网络,pytorch,机器学习)