Neuron types

Build Nengo neuron types into the TensorFlow graph.

class nengo_dl.neuron_builders.GenericNeuronBuilder(ops, signals, config)[source]

Builds all neuron types for which there is no custom Tensorflow implementation.

Notes

These will be executed as native Python functions, requiring execution to move in and out of TensorFlow. This can significantly slow down the simulation, so any performance-critical neuron models should consider adding a custom TensorFlow implementation for their neuron type instead.

build_step(signals)[source]

This function builds whatever computations need to be executed in each simulation timestep.

Parameters:
signals : signals.SignalDict

Mapping from Signal to tf.Tensor (updated by operations)

Returns:
list of ``tf.Tensor``, optional

If not None, the returned tensors correspond to outputs with possible side-effects, i.e. computations that need to be executed in the TensorFlow graph even if their output doesn’t appear to be used

class nengo_dl.neuron_builders.RectifiedLinearBuilder(ops, signals, config)[source]

Build a group of RectifiedLinear neuron operators.

build_step(signals)[source]

This function builds whatever computations need to be executed in each simulation timestep.

Parameters:
signals : signals.SignalDict

Mapping from Signal to tf.Tensor (updated by operations)

Returns:
list of ``tf.Tensor``, optional

If not None, the returned tensors correspond to outputs with possible side-effects, i.e. computations that need to be executed in the TensorFlow graph even if their output doesn’t appear to be used

class nengo_dl.neuron_builders.SpikingRectifiedLinearBuilder(ops, signals, config)[source]

Build a group of SpikingRectifiedLinear neuron operators.

build_step(signals)[source]

This function builds whatever computations need to be executed in each simulation timestep.

Parameters:
signals : signals.SignalDict

Mapping from Signal to tf.Tensor (updated by operations)

Returns:
list of ``tf.Tensor``, optional

If not None, the returned tensors correspond to outputs with possible side-effects, i.e. computations that need to be executed in the TensorFlow graph even if their output doesn’t appear to be used

class nengo_dl.neuron_builders.SigmoidBuilder(ops, signals, config)[source]

Build a group of Sigmoid neuron operators.

build_step(signals)[source]

This function builds whatever computations need to be executed in each simulation timestep.

Parameters:
signals : signals.SignalDict

Mapping from Signal to tf.Tensor (updated by operations)

Returns:
list of ``tf.Tensor``, optional

If not None, the returned tensors correspond to outputs with possible side-effects, i.e. computations that need to be executed in the TensorFlow graph even if their output doesn’t appear to be used

class nengo_dl.neuron_builders.LIFRateBuilder(ops, signals, config)[source]

Build a group of LIFRate neuron operators.

build_step(signals)[source]

This function builds whatever computations need to be executed in each simulation timestep.

Parameters:
signals : signals.SignalDict

Mapping from Signal to tf.Tensor (updated by operations)

Returns:
list of ``tf.Tensor``, optional

If not None, the returned tensors correspond to outputs with possible side-effects, i.e. computations that need to be executed in the TensorFlow graph even if their output doesn’t appear to be used

class nengo_dl.neuron_builders.SoftLIFRateBuilder(ops, signals, config)[source]

Build a group of SoftLIFRate neuron operators.

build_step(signals)[source]

This function builds whatever computations need to be executed in each simulation timestep.

Parameters:
signals : signals.SignalDict

Mapping from Signal to tf.Tensor (updated by operations)

Returns:
list of ``tf.Tensor``, optional

If not None, the returned tensors correspond to outputs with possible side-effects, i.e. computations that need to be executed in the TensorFlow graph even if their output doesn’t appear to be used

class nengo_dl.neuron_builders.LIFBuilder(ops, signals, config)[source]

Build a group of LIF neuron operators.

build_step(signals)[source]

This function builds whatever computations need to be executed in each simulation timestep.

Parameters:
signals : signals.SignalDict

Mapping from Signal to tf.Tensor (updated by operations)

Returns:
list of ``tf.Tensor``, optional

If not None, the returned tensors correspond to outputs with possible side-effects, i.e. computations that need to be executed in the TensorFlow graph even if their output doesn’t appear to be used

class nengo_dl.neuron_builders.SimNeuronsBuilder(ops, signals, config)[source]

Builds a group of SimNeurons operators.

Calls the appropriate sub-build class for the different neuron types.

Attributes:
TF_NEURON_IMPL : dict of {NeuronType, builder.OpBuilder}

Mapping from neuron types to custom build classes (neurons without a custom builder will use the generic builder).

build_step(signals)[source]

This function builds whatever computations need to be executed in each simulation timestep.

Parameters:
signals : signals.SignalDict

Mapping from Signal to tf.Tensor (updated by operations)

Returns:
list of ``tf.Tensor``, optional

If not None, the returned tensors correspond to outputs with possible side-effects, i.e. computations that need to be executed in the TensorFlow graph even if their output doesn’t appear to be used