I'm developing a JS library with the ability to create 'flexible' neural networks. Flexible meaning that they don't consist of layers, but merely of single neurons or neuron 'groups'.

I don't want to activate neurons layer by layer, as this does not give a lot of options for layer mutation/modification.

So I'm looking for an algorithm which decides the neuron activation order. Example of a neural net:

This is quite a complex net. But I want to decide the activation order of this neural network with an algorithm, of course I can figure it out myself, some of the correct orders are:

1, 2, 3, 4, 5, 6, 7, 8, 9, 10

1, 2, 4, 3, 5, 6, 8, 7, 10, 9

3, 5, 8, 1, 2, 4, 6, 7, 9, 10

I need an algorithm which returns a possible activation order! Any hints? (The algorithm is given the connections between neurons.)

But it gets more complex... say we have some short term memory:

The algorithm should not take any connections that serve as memory into consideration. So these two added memory connections shouldn't alter the activation order!

  • $\begingroup$ For your future reference when you are writing papers for publication: apostrophe+s stands for is ("what's = what is", "it's = it is", "how's = how is", etc.) "get's" therefore does not make any sense (get is?) $\endgroup$ Mar 21 '17 at 13:15
  • $\begingroup$ You want to find some order or every possible order? $\endgroup$ Mar 21 '17 at 16:51
  • $\begingroup$ Topological sorting is probably what you need: en.wikipedia.org/wiki/Topological_sorting $\endgroup$
    – itdxer
    Mar 21 '17 at 17:59
  • $\begingroup$ I want to find the order with the least possible memory connections $\endgroup$ Mar 21 '17 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.