def __init__(self,
               name,
               numCorticalColumns=1,
               L2Overrides={},
               L4Overrides={},
               L5Overrides={},
               L6Overrides={},
               numLearningPoints=3,
               seed=42,
               logCalls = False
               ):
    """
    Creates the network.

    Parameters:
    ----------------------------
    @param   name (str)
             Experiment name

    @param   numCorticalColumns (int)
             Number of cortical columns in the network

    @param   L2Overrides (dict)
             Parameters to override in the L2 region

    @param   L4Overrides (dict)
             Parameters to override in the L4 region

    @param   L5Overrides (dict)
             Parameters to override in the L5 region

    @param   L6Overrides (dict)
             Parameters to override in the L6 region

    @param   numLearningPoints (int)
             Number of times each pair should be seen to be learnt

    @param   logCalls (bool)
             If true, calls to main functions will be logged internally. The
             log can then be saved with saveLogs(). This allows us to recreate
             the complete network behavior using rerunExperimentFromLogfile
             which is very useful for debugging.
    """
    # Handle logging - this has to be done first
    self.logCalls = logCalls

    registerAllResearchRegions()
    self.name = name

    self.numLearningPoints = numLearningPoints
    self.numColumns = numCorticalColumns
    self.sensorInputSize = 2048
    self.numInputBits = 40

    # seed
    self.seed = seed
    random.seed(seed)

    # Get network parameters and update with overrides
    self.config = {
      "networkType": "L2456Columns",
      "numCorticalColumns": numCorticalColumns,
      "randomSeedBase": self.seed,
    }
    self.config.update(self.getDefaultParams())

    self.config["L2Params"].update(L2Overrides)
    self.config["L4Params"].update(L4Overrides)
    self.config["L5Params"].update(L5Overrides)
    self.config["L6Params"].update(L6Overrides)

    # create network and retrieve regions
    self.network = createNetwork(self.config)
    self._retrieveRegions()

    # will be populated during training
    self.objectRepresentationsL2 = {}
    self.objectRepresentationsL5 = {}
    self.statistics = []
def __init__ ( self , name , numCorticalColumns = 1 , L2Overrides = { } , L4Overrides = { } , L5Overrides = { } , L6Overrides = { } , numLearningPoints = 3 , seed = 42 , logCalls = False ) : self . logCalls = logCalls registerAllResearchRegions ( ) self . name = name self . numLearningPoints = numLearningPoints self . numColumns = numCorticalColumns self . sensorInputSize = 2048 self . numInputBits = 40 self . seed = seed random . seed ( seed ) self . config = { "networkType" : "L2456Columns" , "numCorticalColumns" : numCorticalColumns , "randomSeedBase" : self . seed , } self . config . update ( self . getDefaultParams ( ) ) self . config [ "L2Params" ] . update ( L2Overrides ) self . config [ "L4Params" ] . update ( L4Overrides ) self . config [ "L5Params" ] . update ( L5Overrides ) self . config [ "L6Params" ] . update ( L6Overrides ) self . network = createNetwork ( self . config ) self . _retrieveRegions ( ) self . objectRepresentationsL2 = { } self . objectRepresentationsL5 = { } self . statistics = [ ]
Creates the network.

    Parameters:
    ----------------------------
    @param   name (str)
             Experiment name

    @param   numCorticalColumns (int)
             Number of cortical columns in the network

    @param   L2Overrides (dict)
             Parameters to override in the L2 region

    @param   L4Overrides (dict)
             Parameters to override in the L4 region

    @param   L5Overrides (dict)
             Parameters to override in the L5 region

    @param   L6Overrides (dict)
             Parameters to override in the L6 region

    @param   numLearningPoints (int)
             Number of times each pair should be seen to be learnt

    @param   logCalls (bool)
             If true, calls to main functions will be logged internally. The
             log can then be saved with saveLogs(). This allows us to recreate
             the complete network behavior using rerunExperimentFromLogfile
             which is very useful for debugging.