[Nengo-DL]: Adding a dynamic custom layer between two Ensembles

With respect to the bug you raised, I noticed this right now. For the following model:

# input
inp = tf.keras.Input(shape=(28, 28, 1))

# convolutional layers
conv0 = tf.keras.layers.Conv2D(
    filters=32,
    kernel_size=3,
    activation=tf.nn.relu,
)(inp)

# Default pool_size = (2,2), padding = "valid", data_format = "channels_last".
max_pool0 = tf.keras.layers.MaxPool2D()(conv0) 

conv1 = tf.keras.layers.Conv2D(
    filters=64,
    kernel_size=3,
    strides=2,
    activation=tf.nn.relu,
)(max_pool0)

max_pool1 = tf.keras.layers.MaxPool2D()(conv1) 

conv2 = tf.keras.layers.Conv2D(
    filters=64,
    kernel_size=3,
    strides=2,
    activation=tf.nn.relu,
)(max_pool1)


# fully connected layer
flatten = tf.keras.layers.Flatten()(conv2)
dense = tf.keras.layers.Dense(units=10, activation="softmax")(flatten)

model = tf.keras.Model(inputs=inp, outputs=dense)

following is the output w.r.t. connection synapse:

ndl_model = nengo_dl.Converter(model, 
                               swap_activations={tf.nn.relu: nengo.SpikingRectifiedLinear()},
                               scale_firing_rates=100,
                               synapse=0.005)

for conn in ndl_model.net.all_connections:
  print(conn, "| Synapse: ", conn.synapse)

Output:

<Connection from <Node "conv2d.0.bias"> to <Node "conv2d.0.bias_relay">> | Synapse:  None
<Connection from <Node "conv2d.0.bias_relay"> to <Neurons of <Ensemble "conv2d.0">>> | Synapse:  None
<Connection from <Node "input_1"> to <Neurons of <Ensemble "conv2d.0">>> | Synapse:  None
<Connection from <Neurons of <Ensemble "conv2d.0">> to <TensorNode "max_pooling2d">> | Synapse:  None
<Connection from <Node "conv2d_1.0.bias"> to <Node "conv2d_1.0.bias_relay">> | Synapse:  None
<Connection from <Node "conv2d_1.0.bias_relay"> to <Neurons of <Ensemble "conv2d_1.0">>> | Synapse:  None
<Connection from <TensorNode "max_pooling2d"> to <Neurons of <Ensemble "conv2d_1.0">>> | Synapse:  None
<Connection from <Neurons of <Ensemble "conv2d_1.0">> to <TensorNode "max_pooling2d_1">> | Synapse:  None
<Connection from <Node "conv2d_2.0.bias"> to <Node "conv2d_2.0.bias_relay">> | Synapse:  None
<Connection from <Node "conv2d_2.0.bias_relay"> to <Neurons of <Ensemble "conv2d_2.0">>> | Synapse:  None
<Connection from <TensorNode "max_pooling2d_1"> to <Neurons of <Ensemble "conv2d_2.0">>> | Synapse:  None
<Connection from <Node "dense.0.bias"> to <TensorNode "dense.0">> | Synapse:  None
<Connection from <Neurons of <Ensemble "conv2d_2.0">> to <TensorNode "dense.0">> | Synapse:  Lowpass(tau=0.005)

As you can see, only the last connection from 3rd Conv layer to Output dense layer has a connection of 0.005.