Open Whatsetsthisend opened 4 years ago
Class Images Targets P R mAP F1: 0%| | 0/108 [00:00<?, ?it/s]Traceback (most recent call last):
File "
This probably means that you are not using fork to start your
child processes and you have forgotten to use the proper idiom
in the main module:
if __name__ == '__main__':
freeze_support()
...
The "freeze_support()" line can be omitted if the program
is not going to be frozen to produce an executable.
ForkingPickler(file, protocol).dump(obj)
BrokenPipeError: [Errno 32] Broken pipe Class Images Targets P R mAP F1: 0%| | 0/108 [00:00<?, ?it/s] Class Images Targets P R mAP F1: 0%| | 0/108 [00:02<?, ?it/s]
您好作者,我已经勉强的解决了该问题,问题可能是在两个地方的线程抢占,导致了错误,我一开始将错误语句放在main()中保护起来还是出现了莫名的错误,后来我将test.py中Dateloder模块的num_works从一开始min([os.cpu_count(), batch_size, 16],改成0,让图像可以在主线程读取,解决了这个问题,这样想想也有可能是我电脑本身的问题?
win10 将test.py中Dateloder模块的num_works从一开始min([os.cpu_count(), batch_size, 16],改成0
不用改成单线程,加上if name == 'main':即可
我也遇到同样的问题,请问是在哪里加上if name == 'main': 呢?
首先非常感谢作者的开源,但是我在使用tiny剪枝时遇到了错误,BrokenPipeError: [Errno 32] Broken pipe RuntimeError: The "freeze_support()" line can be omitted if the program大致是线程之类的错误,我用的使自己训练的四分类网络就是标准的yolo-tiny只更改了yolo层符合我的四个输出。望作者解答