nengo / nengo-dl

Deep learning integration for Nengo
https://www.nengo.ai/nengo-dl
Other
88 stars 22 forks source link

`None for gradient` Error when setting `configure_settings` #125

Open p3jawors opened 4 years ago

p3jawors commented 4 years ago

I've been following the from_nengo example (https://www.nengo.ai/nengo-dl/examples/from-nengo.html) as a starting point, and when I include the following lines, which are in the example,

    net.config[nengo.Ensemble].trainable = True

I get this error

ValueError: Variable <tf.Variable 'TensorGraph/base_params/float32_1000_12288:0' shape=(1000, 12288) dtype=float32> has `None` for gradient. Please make sure that all of your ops have a gradient defined (i.e. are differentiable). Common ops without gradient: K.argmax, K.round, K.eval.

I've attached a minimal example of this that recreates the issue. You can try it out by commenting/uncommenting lines 53-54. I had to change the filetype to .txt to upload here

single_dense_layer.txt