我將傾錯誤代碼我同時嘗試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