问题
This same issue has been brought up a lot in the past but I have not seen any recent thread, with the newest versions of packages.
I have Python 3.7 on a Windows machine, I install theano as:
pip install theano
I then do import theano
which does not give any errors, but when I do theano.test()
all hell breaks loose.
The error is
theano.gof.opt: ERROR: Optimization failure due to: constant_folding
theano.gof.opt: ERROR: node: InplaceDimShuffle{x}(TensorConstant{1.0})
theano.gof.opt: ERROR: TRACEBACK:
...
File "C:\Users\me\AppData\Local\Continuum\anaconda3\lib\site-packages\theano\gof\cmodule.py", line 2396, in compile_str
(status, compile_stderr.replace('\n', '. ')))
Exception: ('Compilation failed (return status=1): C:\\Users\\me\\AppData\\Local\\Continuum\\anaconda3\\libs/python37.lib: error adding symbols: File in wrong format\r. collect2.exe: error: ld returned 1 exit status\r. ', '[InplaceDimShuffle{x}(TensorConstant{1.0})]')
Has anyone seen this before?
来源:https://stackoverflow.com/questions/59638088/optimization-failure-due-to-constant-folding-error-in-theano-installation-on