Example #1
0
    def configure(self,
                  neurons,
                  lif=True,
                  saturation_range=(200, 300),
                  t_ref=0.001,
                  t_rc=0.01,
                  J_threshold=1,
                  activation_noise=0.1,
                  apply_noise=True,
                  threshold_coverage=0.9,
                  threshold_min=None,
                  threshold_max=None,
                  basis_style='Sphere',
                  sample_style='DefaultSampling',
                  sample_count=None,
                  seed=None,
                  code=None,
                  force_new=False,
                  use_hd=False,
                  basis=None,
                  thresholds=None,
                  saturations=None):
        self.neurons = neurons
        self.lif = lif
        self.saturation_range = saturation_range
        self.t_ref = t_ref
        self.t_rc = t_rc
        self.J_threshold = J_threshold
        self.basis_style = basis_style
        self.sample_style = sample_style
        self.threshold_coverage = threshold_coverage
        self.threshold_min = threshold_min
        self.threshold_max = threshold_max
        if sample_count is None: sample_count = self.dimensions * 500
        self.sample_count = sample_count
        self.activation_noise = activation_noise
        self.apply_noise = apply_noise
        self.decoders = {}
        self.use_hd = use_hd
        self.data_basis = basis
        self.data_thresholds = thresholds
        self.data_saturations = saturations

        self.storage = Storage(self, seed=seed, code=code, force_new=force_new)
        self.seed = self.storage.seed
        self.initialize_node()

        self.mode = 'rate'