Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimization failure in Tutorial #12

Open
KarenUllrich opened this issue Apr 22, 2015 · 5 comments
Open

Optimization failure in Tutorial #12

KarenUllrich opened this issue Apr 22, 2015 · 5 comments

Comments

@KarenUllrich
Copy link

Hallo Jonathan,

I was exited to test your library. I wanted to test the lib after installing by running the Tutorial code. However, I get several

ERROR (theano.gof.opt): Optimization failure due to: local_argmax_pushdown

from my theano bleeding-edge Version and strangely after some compilation the error rises rapidly. The complete output follows:

/home/karen/.local/lib/python2.7/site-packages/Theano-0.7.0-py2.7.egg/theano/scan_module/scan_perform_ext.py:133: RuntimeWarning: numpy.ndarray size changed, may indicate binary incompatibility
  from scan_perform.scan_perform import *
ERROR (theano.gof.opt): Optimization failure due to: local_argmax_pushdown
ERROR (theano.gof.opt): TRACEBACK:
ERROR (theano.gof.opt): Traceback (most recent call last):
  File "/home/karen/.local/lib/python2.7/site-packages/Theano-0.7.0-py2.7.egg/theano/gof/opt.py", line 1488, in process_node
    replacements = lopt.transform(node)
  File "/home/karen/.local/lib/python2.7/site-packages/Theano-0.7.0-py2.7.egg/theano/tensor/nnet/nnet.py", line 1471, in local_argmax_pushdown
    return tensor._max_and_argmax(pre_x, axis)
  File "/home/karen/.local/lib/python2.7/site-packages/Theano-0.7.0-py2.7.egg/theano/gof/op.py", line 507, in __call__
    node = self.make_node(*inputs, **kwargs)
  File "/home/karen/.local/lib/python2.7/site-packages/Theano-0.7.0-py2.7.egg/theano/tensor/basic.py", line 1252, in make_node
    raise TypeError("MaxAndArgmax needs a constant axis")
TypeError: MaxAndArgmax needs a constant axis

ERROR (theano.gof.opt): Optimization failure due to: local_argmax_pushdown
ERROR (theano.gof.opt): TRACEBACK:
ERROR (theano.gof.opt): Traceback (most recent call last):
  File "/home/karen/.local/lib/python2.7/site-packages/Theano-0.7.0-py2.7.egg/theano/gof/opt.py", line 1488, in process_node
    replacements = lopt.transform(node)
  File "/home/karen/.local/lib/python2.7/site-packages/Theano-0.7.0-py2.7.egg/theano/tensor/nnet/nnet.py", line 1477, in local_argmax_pushdown
    ('x', 0))(pre_bias), axis)
  File "/home/karen/.local/lib/python2.7/site-packages/Theano-0.7.0-py2.7.egg/theano/gof/op.py", line 507, in __call__
    node = self.make_node(*inputs, **kwargs)
  File "/home/karen/.local/lib/python2.7/site-packages/Theano-0.7.0-py2.7.egg/theano/tensor/basic.py", line 1252, in make_node
    raise TypeError("MaxAndArgmax needs a constant axis")
TypeError: MaxAndArgmax needs a constant axis

ERROR (theano.gof.opt): Optimization failure due to: local_argmax_pushdown
ERROR (theano.gof.opt): TRACEBACK:
ERROR (theano.gof.opt): Traceback (most recent call last):
  File "/home/karen/.local/lib/python2.7/site-packages/Theano-0.7.0-py2.7.egg/theano/gof/opt.py", line 1488, in process_node
    replacements = lopt.transform(node)
  File "/home/karen/.local/lib/python2.7/site-packages/Theano-0.7.0-py2.7.egg/theano/tensor/nnet/nnet.py", line 1477, in local_argmax_pushdown
    ('x', 0))(pre_bias), axis)
  File "/home/karen/.local/lib/python2.7/site-packages/Theano-0.7.0-py2.7.egg/theano/gof/op.py", line 507, in __call__
    node = self.make_node(*inputs, **kwargs)
  File "/home/karen/.local/lib/python2.7/site-packages/Theano-0.7.0-py2.7.egg/theano/tensor/basic.py", line 1252, in make_node
    raise TypeError("MaxAndArgmax needs a constant axis")
TypeError: MaxAndArgmax needs a constant axis

epoch 0, error=4619.00
the catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult catapult
epoch 100, error=392563.62
epoch 200, error=660598.00
epoch 300, error=914458.50
epoch 400, error=1159042.62
epoch 500, error=1393995.12
the calendar can , the lantern stole .
epoch 600, error=1621452.25
epoch 700, error=1842611.12
epoch 800, error=2058382.50
epoch 900, error=2269960.25
epoch 1000, error=2478081.75
the calendar can , a paper duck , the wrangler can .

Could you provide what lib versions you are using exactly
(i.e. theano, numpy, scipy, blas, ect) so that I can track what might go wrong for me. Thank you very much for help.

Karen

@JonathanRaiman
Copy link
Owner

Hello Karen,

I didn't try the bleeding edge version of Theano, but the latest version on pip works.

Here is my pip3 freeze relevant modules:

Theano==0.7.0rc2
theano-lstm==0.0.14
Cython==0.22
numpy==1.9.2
scipy==0.15.1

And if I check numpy's installation configuration as follows:

import numpy as np
np.__config__.show()

I get:

atlas_3_10_threads_info:
  NOT AVAILABLE
blas_mkl_info:
  NOT AVAILABLE
atlas_blas_info:
  NOT AVAILABLE
mkl_info:
  NOT AVAILABLE
atlas_3_10_blas_threads_info:
  NOT AVAILABLE
lapack_mkl_info:
  NOT AVAILABLE
lapack_opt_info:
    extra_compile_args = ['-msse3', '-DAPPLE_ACCELERATE_SGEMV_PATCH']
    define_macros = [('NO_ATLAS_INFO', 3)]
    extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
atlas_blas_threads_info:
  NOT AVAILABLE
atlas_threads_info:
  NOT AVAILABLE
openblas_info:
  NOT AVAILABLE
atlas_3_10_blas_info:
  NOT AVAILABLE
atlas_info:
  NOT AVAILABLE
openblas_lapack_info:
  NOT AVAILABLE
blas_opt_info:
    extra_compile_args = ['-msse3', '-DAPPLE_ACCELERATE_SGEMV_PATCH', '-I/System/Library/Frameworks/vecLib.framework/Headers']
    define_macros = [('NO_ATLAS_INFO', 3)]
    extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
atlas_3_10_info:
  NOT AVAILABLE

Does that help narrow down the issue?

@KarenUllrich
Copy link
Author

Hallo Jonathan,

I totally forgot about this issue, so sorry for the delayed reply.

At the end of the story, I couldnt really figure out where the error was comming from.

I could only locate that it has something to do with scipy. And that the pip-scipy version (or Github-scipy version) both work fine. However, the apt-get version causes numerical errors. Honestly, I didn't think it was worth investing much time to investigate this issue any further.

Cheers,
Karen

@JonathanRaiman
Copy link
Owner

Got it. Hope it works out!
Best,
Jonathan

@MCadeStewart
Copy link

I've run into the same problem Jonathan,
I was wondering if you installed numpy via the PyPy module? My installs -- via Git, and via the Debian repo on two different machines -- aren't configured in the same way (no lapack or blas support despite being installed..), and I get the errors reported in the OP..
Thanks, \Michael

@ghost
Copy link

ghost commented Mar 28, 2016

Hello,
I ran into the same error with:

How can we solve this ?
Thanks

Win7 64bits
scipy==0.16.0
Cython==0.22.1
numpy==1.9.2
Theano==0.7.0
theano-lstm==0.0.15

lapack_opt_info:
libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'libiomp5md', 'libifportmd', 'mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'libiomp5md', 'libifportmd']
library_dirs = ['C:/Program Files (x86)/Intel/Composer XE/mkl/lib/intel64']
define_macros = [('SCIPY_MKL_H', None)]
include_dirs = ['C:/Program Files (x86)/Intel/Composer XE/mkl/include']
blas_opt_info:
libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'libiomp5md', 'libifportmd']
library_dirs = ['C:/Program Files (x86)/Intel/Composer XE/mkl/lib/intel64']
define_macros = [('SCIPY_MKL_H', None)]
include_dirs = ['C:/Program Files (x86)/Intel/Composer XE/mkl/include']
openblas_lapack_info:
NOT AVAILABLE
lapack_mkl_info:
libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'libiomp5md', 'libifportmd', 'mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'libiomp5md', 'libifportmd']
library_dirs = ['C:/Program Files (x86)/Intel/Composer XE/mkl/lib/intel64']
define_macros = [('SCIPY_MKL_H', None)]
include_dirs = ['C:/Program Files (x86)/Intel/Composer XE/mkl/include']
blas_mkl_info:
libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'libiomp5md', 'libifportmd']
library_dirs = ['C:/Program Files (x86)/Intel/Composer XE/mkl/lib/intel64']
define_macros = [('SCIPY_MKL_H', None)]
include_dirs = ['C:/Program Files (x86)/Intel/Composer XE/mkl/include']
mkl_info:
libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'libiomp5md', 'libifportmd']
library_dirs = ['C:/Program Files (x86)/Intel/Composer XE/mkl/lib/intel64']
define_macros = [('SCIPY_MKL_H', None)]
include_dirs = ['C:/Program Files (x86)/Intel/Composer XE/mkl/include']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants