ArtificialIntelligenceToolkit / conx

The On-Ramp to Deep Learning
http://conx.readthedocs.io
Other
97 stars 19 forks source link

DeepDreams "Concatenate" model layer error #68

Closed benguinsburg closed 6 years ago

benguinsburg commented 6 years ago

Windows 7 Python 3.6.3 Tensorflow 1.4 Conx 3.5.7

Upon executing block 7 of DeepDreams.ipynb, get error saying that a "Concatenate" object from the given model doesn't have any output.

AttributeError                            Traceback (most recent call last)
<ipython-input-7-566aae409db5> in <module>()
----> 1 network = import_keras_model(model, "Inception V3")

d:\python\lib\site-packages\conx\utils.py in import_keras_model(model, network_name)
    364     # Next, connect them up:
    365     for layer_from in model.layers:
--> 366         for node in layer.outbound_nodes:
    367             network.connect(layer_from, node.outbound_layer.name)
    368             print("connecting:", layer_from, node.outbound_layer.name)

AttributeError: 'Concatenate' object has no attribute 'outbound_nodes'
dsblank commented 6 years ago

Thanks for testing and reporting. This notebook is a work in progress; I'll take a look.

dsblank commented 6 years ago

I'm guessing that this is a difference between Theano and TensorFlow, so we'll need a model-agnostic way of getting outbound nodes.

dsblank commented 6 years ago

What version of keras are you using? I can't replicate with TensorFlow.

dsblank commented 6 years ago

I think this is now fixed.