Developing Building BlocksΒΆ
This section explains the generation of new and more complex BuildingBlocks.
An example of such a BuildingBlock can be found in the Building Block documentation, as well as in the respective advanced tutorials such as the threeway network or the OCTA network.
Every building block inherits from the class BuildingBlocks which has attributes
such as sub_blocks, input_groups, output_groups and hidden_groups.
Recommended practices for creating custom BuildingBlocks are as follow:
Keep the class initialization as concise as possible.
Create a generation function which implements the desired connectivity.
Label correctly
sub_blocks,input_groups,output_groupsandhidden_groups.Remember to
_set_tagsas you expand the network and its functionality; it really helps to keep track of the properties of individual groups.
Important Notes:
When running the network, add the newly generated
BuildingBlockas well as all thesub_blocksthe network depends on.
There is a fundamental difference between the attributes
groupsand_groups._groupsis a dictionary containing the objects specific to thatBuildingBlock.groupsis a property of theBuildingBlockclass which returns all_groupsincluded in theBuildingBlockand itssub_blocks.When overwriting an existing population in one of the
sub_blocks._groups, remember to re-initialize all theConnectionsandmonitorsregarding that population. Which will now be specific to the parent class.
Have fun developing your own BuildingBlocks and advancing neuroscience! :)