def write_parameters(self, spec, machine_time_step, weight_scales): # Check timestep is valid if machine_time_step != 1000: raise NotImplementedError( "STDP LUT generation currently only supports 1ms timesteps") # Write lookup tables self._tau_plus_last_entry = plasticity_helpers.write_exp_lut( spec, self._tau_plus, LOOKUP_TAU_PLUS_SIZE, LOOKUP_TAU_PLUS_SHIFT) self._tau_minus_last_entry = plasticity_helpers.write_exp_lut( spec, self._tau_minus, LOOKUP_TAU_MINUS_SIZE, LOOKUP_TAU_MINUS_SHIFT)
def write_parameters(self, spec, machine_time_step, weight_scales): # Check timestep is valid if machine_time_step != 1000: raise NotImplementedError( "STDP LUT generation currently only supports 1ms timesteps") # Write lookup tables self._tau_plus_last_entry = plasticity_helpers.write_exp_lut( spec, self._tau_plus, LOOKUP_TAU_PLUS_SIZE, LOOKUP_TAU_PLUS_SHIFT) self._tau_minus_last_entry = plasticity_helpers.write_exp_lut( spec, self._tau_minus, LOOKUP_TAU_MINUS_SIZE, LOOKUP_TAU_MINUS_SHIFT)
def write_parameters(self, spec, machine_time_step, weight_scales): # Check timestep is valid if machine_time_step != 1000: raise NotImplementedError("STDP LUT generation currently only " "supports 1ms timesteps") # Write alpha to spec fixed_point_alpha = plasticity_helpers.float_to_fixed( self._alpha, plasticity_helpers.STDP_FIXED_POINT_ONE) spec.write_value(data=fixed_point_alpha, data_type=DataType.INT32) # Write lookup table plasticity_helpers.write_exp_lut(spec, self.tau, LOOKUP_TAU_SIZE, LOOKUP_TAU_SHIFT)
def write_parameters(self, spec, machine_time_step, weight_scales): # Check timestep is valid if machine_time_step != 1000: raise NotImplementedError("STDP LUT generation currently only " "supports 1ms timesteps") # Write alpha to spec fixed_point_alpha = plasticity_helpers.float_to_fixed( self._alpha, plasticity_helpers.STDP_FIXED_POINT_ONE) spec.write_value(data=fixed_point_alpha, data_type=DataType.INT32) # Write lookup table plasticity_helpers.write_exp_lut( spec, self.tau, LOOKUP_TAU_SIZE, LOOKUP_TAU_SHIFT)