ncps
ncps copied to clipboard
AttributeError: 'FullyConnected' object has no attribute 'sensory_adjacency_matrix'
hi,ace! I am very interested in your work and using your LTCcell to model time series. However, the following problems appear in the process of use, may I ask why? I am a beginner and I hope to get your help Here is my code: `
def main(argv):
wiring = kerasncp.wirings.FullyConnected(8, FLAGS.rnn_units) # 16 units, 8 motor neurons
ltc_cell = LTCCell(wiring, FLAGS.emb_dim)
casflow_inputs = tf.keras.layers.Input(shape=(FLAGS.max_seq, FLAGS.emb_dim))
bn_casflow_inputs = tf.keras.layers.BatchNormalization()(casflow_inputs)
gru_2 = tf.keras.layers.Bidirectional(tf.keras.layers.RNN(ltc_cell))(bn_casflow_inputs)
mlp_1 = tf.keras.layers.Dense(128, activation='relu')(gru_2)
mlp_2 = tf.keras.layers.Dense(64, activation='relu')(mlp_1)
outputs = tf.keras.layers.Dense(1)(mlp_2)`
There is a bug in the running:

`
hi @zengxiang01
Thanks for reporting the bug.
It seems that the bug is caused by the use of an LTC model inside a tf.keras.layers.Bidirectional module.
I will be working on a fix.
Hi @zengxiang01
I have pushed a potential fix (keras-ncp version 2.0.7). Can you please update to this version and test your code?