GithubHelp home page GithubHelp logo

Comments (3)

pplonski avatar pplonski commented on June 23, 2024

Hi! I think it can be problem with keras 2.0, it is not tested, could you try with keras 1.2.2 ?

from keras2cpp.

muthiyanbhushan avatar muthiyanbhushan commented on June 23, 2024

Hello pplonski,

I resolved that issue by changing to keras 1.2.2 but now another issue with Theano ifelse condition

$ python example/mnist_cnn_one_iteration.py

Using Theano backend.
Downloading data from https://s3.amazonaws.com/img-datasets/mnist.pkl.gz
15302656/15296311 [==============================] - 2s
X_train shape: (60000, 1, 28, 28)
60000 train samples
10000 test samples
Traceback (most recent call last):
File "example/mnist_cnn_one_iteration.py", line 54, in
model.add(Dropout(0.25))
File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 327, in add
output_tensor = layer(self.outputs[0])
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 569, in call
self.add_inbound_node(inbound_layers, node_indices, tensor_indices)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 632, in add_inbound_node
Node.create_node(self, inbound_layers, node_indices, tensor_indices)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 164, in create_node
output_tensors = to_list(outbound_layer.call(input_tensors[0], mask=input_masks[0]))
File "/usr/local/lib/python2.7/dist-packages/keras/layers/core.py", line 90, in call
x = K.in_train_phase(K.dropout(x, self.p, noise_shape), x)
File "/usr/local/lib/python2.7/dist-packages/keras/backend/theano_backend.py", line 1120, in in_train_phase
x = theano.ifelse.ifelse(_LEARNING_PHASE, x, alt)
AttributeError: 'module' object has no attribute 'ifelse'

Thanks for your help.

Bhushan

from keras2cpp.

peacherwu avatar peacherwu commented on June 23, 2024

Probably you have resolved this issue, just for the sake of completeness.

You can modify the .../theano_backend.py according to this:
https://stackoverflow.com/questions/46253744/getting-error-attributeerror-module-object-has-no-attribute-ifelse

from keras2cpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.