Возникла исключительная ситуация при использовании lazylinker в коде python / theano

Я пытался запустить скрипт .py, который использует theano \ gof \ lazylinker_c.py в Windows10. Он также использует Mingw для компиляции. Я сталкиваюсь со следующей ошибкой, которую не знаю, как ее устранить. Она показывает эту ошибку «ошибка: явное определение в объявлении« двойной гипотезы (double, double) »)

Ошибка:

    Problem occurred during compilation with the command line below:
"C:\Program Files (x86)\mingw-w64\i686-7.2.0-posix-dwarf-rt_v5-rev1\mingw32\bin\g++.exe" -shared -g -march=skylake -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mmovbe -maes -mno-sha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -msgx -mbmi2 -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mrdseed -mprfchw -madx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mclflushopt -mxsavec -mxsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -mno-rdpid --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=skylake -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m32 -I"C:\Python27\lib\site-packages\numpy\core\include" -I"C:\Python27\include" -I"C:\Python27\lib\site-packages\theano\gof" -L"C:\Python27\libs" -L"C:\Python27" -o C:\Users\eshan\AppData\Local\Theano\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-2.7.10-32\lazylinker_ext\lazylinker_ext.pyd C:\Users\eshan\AppData\Local\Theano\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-2.7.10-32\lazylinker_ext\mod.cpp -lpython27
In file included from C:/Program Files (x86)/mingw-w64/i686-7.2.0-posix-dwarf-rt_v5-rev1/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/cmath:45:0,
from C:/Program Files (x86)/mingw-w64/i686-7.2.0-posix-dwarf-rt_v5-rev1/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/math.h:36,
from C:\Python27\include/pyport.h:325,
from C:\Python27\include/Python.h:58,
from C:\Users\eshan\AppData\Local\Theano\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-2.7.10-32\lazylinker_ext\mod.cpp:1:
C:/Program Files (x86)/mingw-w64/i686-7.2.0-posix-dwarf-rt_v5-rev1/mingw32/i686-w64-mingw32/include/math.h:882:46: error: explicit qualification in declaration of 'double hypot(double, double)'
extern double __cdecl hypot (double, double) __MINGW_ATTRIB_DEPRECATED_MSVC2005; /* in libmoldname.a */
^

---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
C:\Users\eshan\Downloads\depth\depth\net.py in <module>()
25 from collections import OrderedDict
26
---> 27 import theano, theano.tensor as T
28 from theano.tensor.nnet import conv as theano_conv
29 from theano.tensor.nnet import sigmoid

C:\Python27\lib\site-packages\theano\__init__.pyc in <module>()
64     object2, utils)
65
---> 66 from theano.compile import (
67     SymbolicInput, In,
68     SymbolicOutput, Out,

C:\Python27\lib\site-packages\theano\compile\__init__.py in <module>()
8         SpecifyShape, specify_shape, register_specify_shape_c_code)
9
---> 10 from theano.compile.function_module import *
11
12 from theano.compile.mode import *

C:\Python27\lib\site-packages\theano\compile\function_module.py in <module>()
19 from theano.compat import izip
20 from theano.gof import graph
---> 21 import theano.compile.mode
22 import theano.compile.profiling
23 from theano.compile.io import (

C:\Python27\lib\site-packages\theano\compile\mode.py in <module>()
8 import theano
9 from theano import gof
---> 10 import theano.gof.vm
11 from theano.configparser import config
12 from theano.compile.ops import _output_guard

C:\Python27\lib\site-packages\theano\gof\vm.py in <module>()
660     if not theano.config.cxx:
661         raise theano.gof.cmodule.MissingGXX('lazylinker will not be imported if theano.config.cxx is not set.')
--> 662     from . import lazylinker_c
663
664     class CVM(lazylinker_c.CLazyLinker, VM):

C:\Python27\lib\site-packages\theano\gof\lazylinker_c.py in <module>()
125             args = cmodule.GCC_compiler.compile_args()
126             cmodule.GCC_compiler.compile_str(dirname, code, location=loc,
--> 127                                              preargs=args)
128             # Save version into the __init__.py file.
129             init_py = os.path.join(loc, '__init__.py')

C:\Python27\lib\site-packages\theano\gof\cmodule.pyc in compile_str(module_name, src_code, location, include_dirs, lib_dirs, libs, preargs, py_module, hide_symbols)
2314             # difficult to read.
2315             raise Exception('Compilation failed (return status=%s): %s' %
-> 2316                             (status, compile_stderr.replace('\n', '. ')))
2317         elif config.cmodule.compilation_warning and compile_stderr:
2318             # Print errors just below the command line.

Exception: Compilation failed (return status=1): In file included from C:/Program Files (x86)/mingw-w64/i686-7.2.0-posix-dwarf-rt_v5-rev1/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/cmath:45:0,.                  from C:/Program Files (x86)/mingw-w64/i686-7.2.0-posix-dwarf-rt_v5-rev1/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/c++/math.h:36,.                  from C:\Python27\include/pyport.h:325,.                  from C:\Python27\include/Python.h:58,.                  from C:\Users\eshan\AppData\Local\Theano\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_78_Stepping_3_GenuineIntel-2.7.10-32\lazylinker_ext\mod.cpp:1:. C:/Program Files (x86)/mingw-w64/i686-7.2.0-posix-dwarf-rt_v5-rev1/mingw32/i686-w64-mingw32/include/math.h:882:46: error: explicit qualification in declaration of 'double hypot(double, double)'.    extern double __cdecl hypot (double, double) __MINGW_ATTRIB_DEPRECATED_MSVC2005; /* in libmoldname.a */.

Прямо сейчас в моей системе установлены CUDA и cuDNN. Заранее спасибо.

0

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы [email protected]