def __init__(
            self, input_slice, minimum_buffer_sdram, receive_buffer_host,
            maximum_sdram_for_buffering, using_auto_pause_and_resume,
            receive_buffer_port, input_filters, input_n_keys,
            time_between_requests, buffer_size_before_receive,
            label):
        AbstractNengoMachineVertex.__init__(self, label=label)
        MachineDataSpecableVertex.__init__(self)
        AbstractHasAssociatedBinary.__init__(self)
        AbstractAcceptsMulticastSignals.__init__(self)
        AbstractReceiveBuffersToHost.__init__(self)
        ProvidesProvenanceDataFromMachineImpl.__init__(self)

        self._input_slice = input_slice
        self._minimum_buffer_sdram = minimum_buffer_sdram
        self._maximum_sdram_for_buffering = maximum_sdram_for_buffering
        self._using_auto_pause_and_resume = using_auto_pause_and_resume
        self._receive_buffer_host = receive_buffer_host
        self._receive_buffer_port = receive_buffer_port
        self._input_filters = input_filters
        self._input_n_keys = input_n_keys
        self._time_between_requests = time_between_requests
        self._buffer_size_before_receive = buffer_size_before_receive
        self._buffered_sdram_per_timestep = [
            self.SDRAM_RECORDING_SDRAM_PER_ATOM * input_slice.n_atoms]
Пример #2
0
 def __init__(self, partition_identifier, filter, row_id, constraints=None):
     label = "retina filter for row {}".format(row_id)
     MachineVertex.__init__(self, label, constraints)
     MachineDataSpecableVertex.__init__(self)
     AbstractHasAssociatedBinary.__init__(self)
     AbstractProvidesOutgoingPartitionConstraints.__init__(self)
     self._partition_identifier = partition_identifier
     self._filter = filter
     self._row_id = row_id
Пример #3
0
    def __init__(self, size_in, input_filters, inputs_n_keys, hostname, label):
        AbstractNengoMachineVertex.__init__(self, label=label)
        MachineDataSpecableVertex.__init__(self)
        AbstractHasAssociatedBinary.__init__(self)
        AbstractAcceptsMulticastSignals.__init__(self)
        ProvidesProvenanceDataFromMachineImpl.__init__(self)

        self._size_in = size_in
        self._input_filters = input_filters
        self._input_n_keys = inputs_n_keys
        self._hostname = hostname
        self._output_lock = threading.Lock()
        self._output = numpy.zeros(self._size_in)
    def __init__(
            self, sub_population_id, neuron_slice, input_slice, output_slice,
            learnt_slice, resources, encoders_with_gain, tau_rc, tau_refactory,
            ensemble_size_in, label, learnt_encoder_filters, input_filters,
            inhibitory_filters, modulatory_filters, pes_learning_rules,
            ensemble_radius, minimum_buffer_sdram_usage, bias_with_di,
            buffered_sdram_per_timestep, overflow_sdram, is_recording,
            encoders_with_gain_shape, gain, decoders, learnt_decoders):
        AbstractNengoMachineVertex.__init__(self, label=label)
        MachineDataSpecableVertex.__init__(self)
        AbstractHasAssociatedBinary.__init__(self)
        AbstractAcceptsMulticastSignals.__init__(self)
        AbstractTransmitsMulticastSignals.__init__(self)
        AbstractReceiveBuffersToHost.__init__(self)
        ProvidesProvenanceDataFromMachineImpl.__init__(self)

        self._resources = resources
        self._neuron_slice = neuron_slice
        self._input_slice = input_slice
        self._output_slice = output_slice
        self._learnt_slice = learnt_slice
        self._sub_population_id = sub_population_id
        self._ensemble_size_in = ensemble_size_in
        self._encoders_with_gain = encoders_with_gain
        self._tau_rc = tau_rc
        self._tau_refactory = tau_refactory
        self._learnt_encoder_filters = learnt_encoder_filters
        self._input_filters = input_filters
        self._inhibitory_filters = inhibitory_filters
        self._modulatory_filters = modulatory_filters
        self._local_pes_learning_rules = pes_learning_rules
        self._ensemble_radius = ensemble_radius
        self._bias_with_di = bias_with_di
        self._encoders_with_gain_shape = encoders_with_gain_shape
        self._gain = gain
        self._decoders = decoders
        self._learnt_decoders = learnt_decoders

        # recording params
        self._minimum_buffer_sdram_usage = minimum_buffer_sdram_usage
        self._buffered_sdram_per_timestep = buffered_sdram_per_timestep
        self._overflow_sdram = overflow_sdram
        self._is_recording = is_recording
    def __init__(self, outgoing_partition_slice, update_period,
                 minimum_buffer_sdram, receive_buffer_host,
                 maximum_sdram_for_buffering, using_auto_pause_and_resume,
                 receive_buffer_port, is_recording_output, this_cores_matrix,
                 label):

        AbstractNengoMachineVertex.__init__(self, label=label)
        MachineDataSpecableVertex.__init__(self)
        AbstractHasAssociatedBinary.__init__(self)
        AbstractTransmitsMulticastSignals.__init__(self)
        ProvidesProvenanceDataFromMachineImpl.__init__(self)

        self._outgoing_partition_slice = outgoing_partition_slice
        self._minimum_buffer_sdram = minimum_buffer_sdram
        self._maximum_sdram_for_buffering = maximum_sdram_for_buffering
        self._using_auto_pause_and_resume = using_auto_pause_and_resume
        self._receive_buffer_host = receive_buffer_host
        self._receive_buffer_port = receive_buffer_port
        self._update_period = update_period
        self._is_recording_output = is_recording_output
        self._output_data = this_cores_matrix
    def __init__(self, size_in, output_slice, transform_data, n_keys,
                 filter_keys, output_slices, machine_time_step, filters, label,
                 constraints):
        AbstractNengoMachineVertex.__init__(self,
                                            label=label,
                                            constraints=constraints)
        AbstractHasAssociatedBinary.__init__(self)
        AbstractAcceptsMulticastSignals.__init__(self)
        MachineDataSpecableVertex.__init__(self)
        AbstractTransmitsMulticastSignals.__init__(self)
        ProvidesProvenanceDataFromMachineImpl.__init__(self)

        self._size_in = size_in
        self._output_slice = output_slice
        self._transform_data = transform_data
        self._n_keys = n_keys
        self._filter_keys = filter_keys
        self._output_slices = output_slices
        self._machine_time_step = machine_time_step
        self._filters = filters

        # Store which signal parameter slices we contain
        self._transmission_params = self._filter_transmission_params()
Пример #7
0
    def __init__(self, outgoing_partition, label):
        AbstractNengoMachineVertex.__init__(self, label)
        MachineDataSpecableVertex.__init__(self)
        AbstractHasAssociatedBinary.__init__(self)
        AbstractTransmitsMulticastSignals.__init__(self)
        AbstractProvidesNKeysForPartition.__init__(self)
        AbstractRecordable.__init__(self)
        ProvidesProvenanceDataFromMachineImpl.__init__(self)

        # TODO WHY DO WE PARTITION OVER OUTGOING PARTITIONS!!!
        self._managing_app_outgoing_partition = outgoing_partition

        transform = self._managing_app_outgoing_partition.identifier\
            .transmission_parameter.full_transform(
                slice_out=self.TRANSFORM_SLICE_OUT)
        self._n_keys = transform.shape[0]
        self._n_packets_transmitted = 0

        # Check n keys size
        if self._n_keys > self.MAX_N_KEYS_SUPPORTED:
            raise NotImplementedError(
                "Connection is too wide to transmit to SpiNNaker. "
                "Consider breaking the connection up or making the "
                "originating node a function of time Node.")
Пример #8
0
 def __init__(self, mbs, constraint):
     self._mbs = mbs * self.SDRAM_READING_SIZE_IN_BYTES_CONVERTER
     MachineVertex.__init__(self, label="speed", constraints=[constraint])
     MachineDataSpecableVertex.__init__(self)
     AbstractHasAssociatedBinary.__init__(self)