MichalDanielDobrzanski / DeepLearningPython

neuralnetworksanddeeplearning.com integrated scripts for Python 3.5.2 and Theano with CUDA support
MIT License
2.79k stars 1.27k forks source link

ImportError: cannot import name 'downsample' #5

Closed itosve closed 7 years ago

itosve commented 7 years ago

Running Mac OS X Sierra High, Python 3.6, got the Error: ImportError: cannot import name 'downsample', when running python test.py

Solution: Had to change the following lines to get it work:

from theano.tensor.signal import downsample

from theano.tensor.signal import pool

pooled_out = downsample.max_pool_2d(

pooled_out = pool.pool_2d(

and also clear the theano cache: theano-cache purge

MichalDanielDobrzanski commented 7 years ago

Issue resolved with merge request: https://github.com/MichalDanielDobrzanski/DeepLearningPython35/pull/2