GithubHelp home page GithubHelp logo

Comments (6)

rbodo avatar rbodo commented on June 21, 2024 1

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.

rbodo avatar rbodo commented on June 21, 2024

Hi Thomas,

Here's a configuration that allows me to run the LeNet example with Theano, Tensorflow, and Lasagne.

packages.txt

(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.

simak-alexandr avatar simak-alexandr commented on June 21, 2024

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.

simak-alexandr avatar simak-alexandr commented on June 21, 2024

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.

rbodo avatar rbodo commented on June 21, 2024

No problem, happy it worked.

from snn_toolbox.

tompfeil avatar tompfeil commented on June 21, 2024

Hi, this actually also solved my problem, thanks.

from snn_toolbox.

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.