I am working on creating builders for nengo DL for a custom neuron type as well as a learning rule type. The neuron type is coming along fine but I am having some issues with the learning rule type. I need the initial values of the weights (as well as from another attribute). Now i know how to get the weights to the tensorflow simulator :
necessities for the builder:
@nengo_dl.builder.Builder.register(SimNAME) class SimNAMEBuilder(OpBuilder): """Build a group of `.NAME` operators.""" def __init__(self, ops, signals, config): super(SimNAMEBuilder, self).__init__(ops, signals, config) self.weights_data = signals.combine([op.weights for op in ops])
In the simulation builder for the regular Nengo ( class SimNAME(Operator) ) i can get the initial values by
initial_weights = self.weights.initial_value
Affter i read the weights to self.weights. The problem is that “.initial_value” does not work with the code for the tensorflow simulator. Not like this:
self.initial_weights_data = signals.combine([op.weights.initial_value for op in ops])
And not like this:
self.weights_data = signals.combine([op.weights for op in ops]) self.initial_weights_data = self.weights_data.initial_value
Does anyone know how to solve this issue and get the initial values into the tensorflow simulator?
I tried figuring it out with the documentation from nengo_dl.learning_rule_builders but these builders do not use initial values anywhere.
I use Nengo version 2.8.0 and Nengo DL version 2.2.2