我将倾错误代码我同时尝试python脚本窗口:RuntimeError在试图蟒蛇多处理
预处理验证数据的前期
使用GPU设备0:特斯拉K20C
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\SciSoft\WinPython-64bit-2.7.6.4\python-2.7.6.amd64\lib\multiprocessing\forking.py", line 380, in main prepare(preparation_data)
File "C:\SciSoft\WinPython-64bit-2.7.6.4\python-2.7.6.amd64\lib\multiprocessing\forking.py", line 495, in prepare '__parents_main__', file, path_name, etc
File "C:\Users\Administrator\Desktop\Galaxy Data\kaggle-galaxies-master\kaggle-galaxies-master\try_convnet_cc_multirotflip_3x69r45_maxout2048_extradense.py", line 133, in <module>
for data, length in create_valid_gen():
File "load_data.py", line 572, in buffered_gen_mp process.start()
'文件“C:\ SciSoft \ WinPython-64-2.7.6.4 \ python的-2.7.6.amd64 \ LIB \ multiprocessing \ process.py“,行130,开头 self._popen = Popen(self)
文件“C:\ SciSoft \ WinPython-64bit-2.7.6.4 \ python-2.7.6.amd64 \ lib \ multiprocessing \ forking.py”,行258,在init cmd = get_command_line()+ [rhandle]
文件 “C:\ SciSoft \ WinPython-64-2.7.6.4 \蟒-2.7.6.amd64 \ lib中\多\ forking.py”,线358,在get_command_line`
is not going to be frozen to produce a Windows executable.''')
RuntimeError : 尝试在当前进程 完成其引导阶段之前开始新进程。
This probably means that you are on Windows 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 a Windows executable.
据我了解我要插入一行
if __name__ == '__main__':
一些从哪里得到它的工作
谁能告诉我其中的文件,我应该插入呢?我已经包含在最初的错误日志
受感染文件被感染的文件列表:
线131-134
和
https://github.com/benanne/kaggle-galaxies/blob/master/load_data.py
线572
你能告诉我们你的代码吗? – laike9m 2015-03-03 11:33:43
是提供指向文件的链接 – 2015-03-03 12:31:27