Learning rules

Build Nengo learning rules into the TensorFlow graph.

class nengo_dl.learning_rule_builders.SimBCMBuilder(ops, signals)[source]

Build a group of SimBCM 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.learning_rule_builders.SimOjaBuilder(ops, signals)[source]

Build a group of SimOja 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.learning_rule_builders.SimVojaBuilder(ops, signals)[source]

Build a group of SimVoja 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

nengo_dl.learning_rule_builders.build_pes(model, pes, rule)[source]

Builds a PES object into a model.

A re-implementation of the Nengo PES rule builder, so that we can avoid slicing the encoders.

See build_pes().

Parameters:
model : Model

The model to build into.

pes : PES

Learning rule type to build.

rule : LearningRule

The learning rule object corresponding to the neuron type.