How to Extract Network for use in application?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to Extract Network for use in application?

tonyc
Hi,

I am new to SIMBrain and just created a simple Backdrop network. I have trained the network, but now I want to implement the network in code for use in a test application.

How can I get the nodes and their properties exported so I can create the static code for use?

Thanks,
Tony
Reply | Threaded
Open this post in threaded view
|

Re: How to Extract Network for use in application?

jyoshimi
Administrator
Hi Tony,

The way to do this is to just use the Simbrain.jar in a java program (or another language that calls java).  

Some posts here discuss this

http://simbrain.963258.n4.nabble.com/quot-workspace-quot-error-in-Java-td4640482.html

http://simbrain.963258.n4.nabble.com/Simbrain-Network-in-agent-based-simulation-td4640460.html#a4640461

- Jeff
Reply | Threaded
Open this post in threaded view
|

Re: How to Extract Network for use in application?

Tony
Hi Jeff, thanks for the reply, however that won't work in my case as the model, once trained, needs to go onto an embedded platform C/C++.

If there is a way to extract the model data (nodes, coefficients, etc.) for each node I can probably generate a C library specific for my application....

How can I do this?

Thanks...
Reply | Threaded
Open this post in threaded view
|

Re: How to Extract Network for use in application?

jyoshimi
Administrator
Hi again.  There is no direct method that I can think of, but it would be pretty easy to do this (and if you do, share it so we can add it to Simbrain!).

Probably the easiest would be to look at saveToMatFiles.bsh in scripts/network.   That just gets activations and weightmatrices.  Another approach is in scripts/console/createScriptLines.bsh.  

For smaller networks where no compression is used, you can just save as xml and write something to extract values from that. For larger networks the weights get saved in a compressed format.