Code Monkey home page Code Monkey logo

models's People

Contributors

ai-pha avatar awintel avatar bamsumit avatar gabofguerra avatar joyeshmishra avatar lyes-khacef avatar philippplank avatar rbodo avatar sagacitysite avatar sfblackl-intel avatar srrisbud avatar tihbe avatar wilkieolin avatar ysingh7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

models's Issues

'SNN' object has no attribute '_is_aedat_input'

Hello,
Thanks for sharing the DNN implementation on the Loihi chip!
When I was trying to reproduce the b_image_classification_cifar.ipynb, I encountered this error:
AttributeError: 'SNN' object has no attribute '_is_aedat_input'.
Any ideas on how to fix this?

Thanks!
`---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
in
7 )
8
----> 9 convert_model(config_file_path)

in convert_model(config_file_path)
4 from snntoolbox.bin.run import main
5
----> 6 main(config_file_path)

~/nxsdk095/lib/python3.5/site-packages/snntoolbox/bin/run.py in main(filepath)
29 if filepath is not None:
30 config = update_setup(filepath)
---> 31 run_pipeline(config)
32 return
33

~/nxsdk095/lib/python3.5/site-packages/snntoolbox/bin/utils.py in run_pipeline(config, queue)
125 config.get('paths', 'filename_parsed_model')))
126
--> 127 spiking_model.build(parsed_model, **testset)
128
129 # Export network in a format specific to the simulator with which it

~/nxsdk095/lib/python3.5/site-packages/snntoolbox/simulation/utils.py in build(self, parsed_model, **kwargs)
434
435 # Iterate over layers to create spiking neurons and connections.
--> 436 self.setup_layers(batch_shape)
437
438 print("Compiling spiking model...\n")

~/nxsdk095/lib/python3.5/site-packages/snntoolbox/simulation/utils.py in setup_layers(self, batch_shape)
765 """Iterates over all layers to instantiate them in the simulator"""
766
--> 767 self.add_input_layer(batch_shape)
768 for layer in self.parsed_model.layers[1:]:
769 print("Building layer: {}".format(layer.name))

~/0.9.5/nxsdk-apps-0.9.5/inrc_dnn/nxsdk_modules_ncl/snntoolbox/nx_backend.py in add_input_layer(self, input_shape)
255 if self._poisson_input:
256 raise NotImplementedError
--> 257 elif self._is_aedat_input:
258 input_mode = nxtf.InputModes.AEDAT
259 else:`

Difference between act(y) and act(yref) causes errors when the activation function is LeakyRelu

Hi,
Inside the class SigmaDeltaNeuronsInstErrExec, the use of "self.process.act_fn(y) - self.process.act_fn(vars.y_ref)" to compute delta_a causes errors when the activation function is LeakyReLU. This happens because, delta_a is used to update y_ref. Consider a time t when the value of y becomes negative and the slope of leakyrelu for negative values be 0.1, the value of delta_a correctly corresponds to a value (y(t)0.1 - y_ref(t)) and it update y_ref(t) to reflect the value of 0.1y. But in the next time step when y_ref is passed to the activation function, the output becomes 0.01*y(t) and the absolute value of delta_a is more. Instead of applying the activation function over y_ref, a direct subtraction is sufficient and it works for ReLU and other non-linear activation functions also.
I have added the section of code which worked for me.

delta_a = tf.cond(
tf.logical_and(
tf.greater_equal(self.time, self.process.first_valid_ts),
tf.equal(tf.math.mod(self.time
- self.process.first_valid_ts + 1,
self.process.out_decim_interval), 0)),
true_fn=lambda: self.process.act_fn(y)
- vars.y_ref,
false_fn=lambda: tf.zeros_like(vars.delta_a))

SNN-Toolbox adapter sets SLURM environment

Hi,

I am trying to tune an ANN->SNN with a KB device. The example snn_toolbox/examples/mnist_keras_loihi.py tried to run a SLURM session, even though I removed lines 26 os.environ['SLURM'] = '1' and 27 os.environ['PYTHONUNBUFFERED'] = '1'.

Further inspection revealed that models/nxsdk_modules_ncl/snntoolbox/nx_backend.py also sets the SLURM environment in line 71 os.environ['SLURM'] = '1'.

Removing the line lead to successful execution. I thought it might be desired behavior that the environment will be set at top level of the program; maybe you want to remove that line in the repo?

AttributeError: 'NxConv1D' object has no attribute '_padding_op'

Hi,

I'm trying to use the NxConv1D. However, I encountered these problems:

  1. in dnn_layers.py, class NxConv1D, the call function's line 1410 doesn't have the attribute '_recreate_conv_op';
  2. if I comment that line out, then the error becomes: AttributeError: 'NxConv1D' object has no attribute '_padding_op'.

So what are these 2 attributes in NxConv1D class?

Thanks!

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.