Closed 011043 closed 2 years ago
您好。这里的self.haze_names是用于获取文件夹下所有文件名的变量。因为我不知道你的data文件夹下的文件排布是怎么样的,无法给出具体的建议。但如果os.walk会报错的话,也可以尝试os.listdir这个函数或者其它一些遍历文件夹获取文件名的函数。对于第二个问题,我也无法直接根据log看出具体的问题。可以尝试把 is not 3 替换成 !=3 试试看?
我也是先 IndexError: list index out of range 再 RuntimeError: An attempt has been made to start a new process before the current process has finished its bootstrapping phase.
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.
您好。这里的self.haze_names是用于获取文件夹下所有文件名的变量。因为我不知道你的data文件夹下的文件排布是怎么样的,无法给出具体的建议。但如果os.walk会报错的话,也可以尝试os.listdir这个函数或者其它一些遍历文件夹获取文件名的函数。对于第二个问题,我也无法直接根据log看出具体的问题。可以尝试把 is not 3 替换成 !=3 试试看?
您好。这里的self.haze_names是用于获取文件夹下所有文件名的变量。因为我不知道你的data文件夹下的文件排布是怎么样的,无法给出具体的建议。但如果os.walk会报错的话,也可以尝试os.listdir这个函数或者其它一些遍历文件夹获取文件名的函数。对于第二个问题,我也无法直接根据log看出具体的问题。可以尝试把 is not 3 替换成 !=3 试试看?
您好,请问“获取文件夹下所有文件名”是指哪个文件夹?谢谢!
是指数据集所在的文件夹。您的报错信息看起来似乎是多进程相关部分有问题
您好,我在尝试运行test.py文件时遇到下列问题。 我将需要测试的图片放在新建的data文件夹中,但是出现以下问题
在我注释掉
self.haze_names = list(os.walk(self.haze_dir))[0][2]
这一行之后,又出现基于我现在的代码水平,确实没有找到解决办法,请问能给予解决答复吗?