GithubHelp home page GithubHelp logo

Comments (2)

rbodo avatar rbodo commented on July 20, 2024

You mean for instance a simulation using the default INIsim?

You could just place a timeit around this line:

import time
start_time = time.time()
output_b_l_t = self.simulate(**data_batch_kwargs)
end_time = time.time()
time_per_batch = end_time - start_time

That gives you the time to run one batch, but includes some post-processing of the result and recorded states (spikes, membrane potentials etc), if so specified in your config.

To get a more fine-grained measurement, time the actual call to the predict method here, which will give you the wall clock time it takes to process one time step in rate-based INIsim.

Just be aware that these measurements are of limited value as this particular simulator is not really optimized for SNNs; each time step is basically a forward pass of the network on a GPU/CPU. It would be more interesting to time a simulator that's based on an actual SNN emulation framework like Brian or Nest, or of course using SNN hardware like SpiNNaker and Loihi.

from snn_toolbox.

RKCZ avatar RKCZ commented on July 20, 2024

Thank you for the advice, I measured the batch time as you hinted me.

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.