Comments (3)
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.
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.
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)
- Support for keras2 HOT 6
- does it support 'Model' model ? HOT 2
- how can I use colored images inputs? HOT 2
- How to port Keras neural network model into C# ? HOT 1
- Looking for a way to receive MSCOCO's Architecture JSON File HOT 1
- When the top layer must be excluded in Keras...
- Running Environment Setting for the Code
- LSTM to CPP, who has good method? HOT 3
- terminate called after throwing an instance of 'std::bad_alloc' HOT 3
- Compatible for python3 and new keras HOT 3
- Right Keras and Tensorflow version? HOT 3
- simpler c++ code HOT 1
- newbie asking
- Conv1D layer support HOT 1
- Cant verify results
- Issue dumping the network to .nnet file HOT 3
- custom model architecture HOT 1
- TypeError: ('Keyword argument not understood:', 'border_mode') HOT 2
- Skip dropout rate error HOT 4
- issue while testing the test_run.sh file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keras2cpp.