Comments (6)
Can you please check that the "image_data_format" parameter is set to "channels_first" in you keras configuration file (~/.keras/keras.json)?
from snn_toolbox.
Hi Thomas,
Here's a configuration that allows me to run the LeNet example with Theano, Tensorflow, and Lasagne.
(There's a lot of unnecessary junk installed in this environment, sorry about that.)
If the problem persists, please share the error message.
Best,
Bodo
from snn_toolbox.
Dear Bodo,
We experience similar situation!
I have just confirmed that downgraded Keras (2.1.3) and Tensorflow (1.8.0rc1) still run to the error for LeNet simulation for the latest snn_toolbox (42d0bcf).
Here is the error message:
Building spiking model...
Building layer: 00Conv2D_6x24x24
Building layer: 01MaxPooling2D_6x12x12
WARNING: Rate-based spiking MaxPooling layer is not implemented in TensorFlow backend. Falling back on AveragePooling. Switch to Theano backend to use MaxPooling.
Traceback (most recent call last):
File "/home/s00328308/tensorflow/venv/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 1567, in _create_c_op
c_op = c_api.TF_FinishOperation(op_desc)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Dimensions must be equal, but are 6 and 3 for '01MaxPooling2D_6x12x12_1/add' (op: 'Add') with input shapes: [1,6,12,12], [1,3,12,24].
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/s00328308/tensorflow/venv/bin/snntoolbox", line 11, in
sys.exit(main())
File "/home/s00328308/tensorflow/venv/lib/python3.5/site-packages/snntoolbox/bin/run.py", line 50, in main
test_full(config)
File "/home/s00328308/tensorflow/venv/lib/python3.5/site-packages/snntoolbox/bin/utils.py", line 111, in test_full
spiking_model.build(parsed_model)
File "/home/s00328308/tensorflow/venv/lib/python3.5/site-packages/snntoolbox/simulation/utils.py", line 425, in build
self.add_layer(layer)
File "/home/s00328308/tensorflow/venv/lib/python3.5/site-packages/snntoolbox/simulation/target_simulators/INI_temporal_mean_rate_target_sim.py", line 91, in add_layer
self._spiking_layers[layer.name] = spike_layer(inbound)
File "/home/s00328308/tensorflow/venv/lib/python3.5/site-packages/keras/engine/topology.py", line 617, in call
output = self.call(inputs, **kwargs)
File "/home/s00328308/tensorflow/venv/lib/python3.5/site-packages/snntoolbox/simulation/backends/inisim/temporal_mean_rate_tensorflow.py", line 485, in decorator
return self.update_neurons()
File "/home/s00328308/tensorflow/venv/lib/python3.5/site-packages/snntoolbox/simulation/backends/inisim/temporal_mean_rate_tensorflow.py", line 98, in update_neurons
new_mem = self.get_new_mem()
File "/home/s00328308/tensorflow/venv/lib/python3.5/site-packages/snntoolbox/simulation/backends/inisim/temporal_mean_rate_tensorflow.py", line 228, in get_new_mem
new_mem = self.mem + masked_impulse
File "/home/s00328308/tensorflow/venv/lib/python3.5/site-packages/tensorflow/python/ops/variables.py", line 796, in _run_op
return getattr(ops.Tensor, operator)(a._AsTensor(), *args)
File "/home/s00328308/tensorflow/venv/lib/python3.5/site-packages/tensorflow/python/ops/math_ops.py", line 979, in binary_op_wrapper
return func(x, y, name=name)
File "/home/s00328308/tensorflow/venv/lib/python3.5/site-packages/tensorflow/python/ops/gen_math_ops.py", line 297, in add
"Add", x=x, y=y, name=name)
File "/home/s00328308/tensorflow/venv/lib/python3.5/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/home/s00328308/tensorflow/venv/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 3392, in create_op
op_def=op_def)
File "/home/s00328308/tensorflow/venv/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 1734, in init
control_input_ops)
File "/home/s00328308/tensorflow/venv/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 1570, in _create_c_op
raise ValueError(str(e))
ValueError: Dimensions must be equal, but are 6 and 3 for '01MaxPooling2D_6x12x12_1/add' (op: 'Add') with input shapes: [1,6,12,12], [1,3,12,24].
Thanks!
from snn_toolbox.
Dear Bodo,
Yes, it made the thing. Thanks!
I have checked the closed Issues and found similar one as resolved, my bad, so sorry.
from snn_toolbox.
No problem, happy it worked.
from snn_toolbox.
Hi, this actually also solved my problem, thanks.
from snn_toolbox.
Related Issues (20)
- AttributeError: module 'numpy' has no attribute 'asscalar'
- TypeError: can't multiply sequence by non-int of type 'float' HOT 4
- IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
- SpinnmanIOException: IO Error: Failed to communicate with the machine HOT 7
- Query regarding INI simulator HOT 6
- Conv1D Conversion Normalization Issue HOT 2
- ONNX model could not be ported to Keras.Mismatched elements 100% HOT 1
- Code required for a research paper HOT 2
- ModuleNotFoundError: No module named 'keras_rewiring' HOT 2
- Which neuromorphic hardware does SNNtoolbox simulate ? HOT 3
- Error happened while building parsed model HOT 2
- Key Error HOT 1
- index -1 is out of bounds for axis 1 with size 0 HOT 2
- Membrane Potential Values after spike conv layer. HOT 1
- Loading a a converted SNN .h5 model using 'load_model' HOT 1
- Energy and runtime estimation for running the SNN on neuromorphic simulator HOT 3
- TTTFS dyn thresh and TTFS corrective not working HOT 2
- Poisson Rate Encoding HOT 4
- Quantization HOT 6
- TTFS 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 snn_toolbox.