What does the chainloading argument in load_patterns do?

Questions concerning the use of Auryn classes. If you want to contribute a howto for a given example code please consider getting write access for the Dokuwiki.
Post Reply
asinha
Posts: 37
Joined: Wed Oct 15, 2014 5:12 pm
Location: Hatfield, Hertfordshire, UK
Contact:

What does the chainloading argument in load_patterns do?

Post by asinha »

I was looking at the class documentation for SparseConnection and noticed a "chainload= false" argument in the function declaration of load_patterns. The documentation doesn't clarify what this does. Can you please clarify? I used it like this:

Code: Select all

for (vector<string>::iterator it = patfilenames.begin(); it != patfilenames.end(); ++it)
{
    con_ee->load_patterns(*it,w_ee*15., false, true);
}
where patfilesnames is a vector containing the filenames of the patterns that I want to load - they may or may not overlap.

This did nothing. In fact, the patterns didn't seem to have loaded at all..
User avatar
zenke
Site Admin
Posts: 156
Joined: Tue Oct 14, 2014 11:34 am
Location: Basel, CH
Contact:

Re: What does the chainloading argument in load_patterns do?

Post by zenke »

Hi there and happy new year,

the chainloading was introduced at some point to load a very primitive connectivity for a synfire chain. When set to "true", what it will do, is to increase the weight of all connections from cells in pattern0 to cells in pattern1 ... then from pattern1 to pattern2 ...

Since this function is not actively maintained it might be purged in one of the future version of Auryn. It is mostly still there for API compatibility. So I would say your usage is correct.

The overwrite argument specifies if all weights which are touched by the call are incremented by the second argument (and therefore allowed to pile up) or set to the second argument.

Finally one word on loading multiple patterns. Although your code should work, you can also load multiple patterns from a single file. The list of NeuronIDs in the textfile just needs to be interrupted by two empty lines. Indices after such a "paragraph" will be interpreted as a new pattern. See also http://www.fzenke.net/auryn/doku.php?id=manual:pat

I hope that helps.

Friedemann
asinha
Posts: 37
Joined: Wed Oct 15, 2014 5:12 pm
Location: Hatfield, Hertfordshire, UK
Contact:

Re: What does the chainloading argument in load_patterns do?

Post by asinha »

Happy new year to you too :)

Thanks for the clarification. Now that I know what chainloading does, I realise that I don't really need it.

About the single pattern file - I was aware of it, but since I was doing a bit of debugging, I decided to use two different pattern files and just threw them in a for loop as the code shows. I'll move it all to a single file when I refactor my work sometime.

Thanks again,
Post Reply