GithubHelp home page GithubHelp logo

Comments (4)

golosio avatar golosio commented on August 24, 2024

Unfortunately currently there is no reset function in NeuronGPU. As a possible workaround, if you are working in bash you can run an external bash script that launches the python script several times. If you need the loop step index, you can use a template python script and a substitution, as in the following example:
file prova.sh:

 #!/bin/bash
for i in $(seq 1 10); do
    cat prova_templ.py | sed "s/__i__/$i/" > prova.py
    python prova.py
done

file prova_templ.py:

run_index = __i__
print("Running step n. ", run_index)

To execute it, type:
. prova.sh
Let me know if this kind of solution is suitable for your needs.

from neurongpu.

HilbertHuangHitomi avatar HilbertHuangHitomi commented on August 24, 2024

Thank you for the response!
It works, but harder to maintain since it needs interactions between bash and python.
I found another solution, using the subprocess package. For example, in file main.py

for i in range(times):
subprocess.run(['python run_simulation.py'])

Then we can run the whole process by python main.py. It may be easier to use.

BTW, is NeuronGPU still actively developed? It is friendly to use for those who are familiar with nest and python. I think this is one important advantage above GeNN. I do look forward to more improvement :P

from neurongpu.

golosio avatar golosio commented on August 24, 2024

Thank you for the interesting and useful solution!
Sure, it is actively developed. If you publish something using it, please cite:
https://www.frontiersin.org/articles/10.3389/fncom.2021.627620/full
Best, Bruno

from neurongpu.

HilbertHuangHitomi avatar HilbertHuangHitomi commented on August 24, 2024

Thank you very much !

from neurongpu.

Related Issues (7)

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.