philipperemy/keract

Example in the README: 'Functional' object has no attribute '_layers'

daniyalmaroufi opened this issue · 2 comments

Hello
I simply run the example in the [Readme]('Functional' object has no attribute '_layers') in the Google Colab, but I get the following error:

AttributeError                            Traceback (most recent call last)
<ipython-input-13-5a0e4925fe5b> in <module>()
      3 keract_inputs = x_train[10:11]
      4 keract_targets = y_train[10:11]
----> 5 activations = get_activations(model, keract_inputs)
      6 all_layers=activations.keys()
      7 

1 frames
/usr/local/lib/python3.7/dist-packages/keract/keract.py in _get_nodes(module, nodes, output_format, nested, layer_names, depth)

AttributeError: 'Sequential' object has no attribute '_layers'

I think it's because of the last update of Keras. Would you fix it?
I Also checked keract-nightly but I got the same error.

773e1a6 fixed in this commit.

Pushed to 4.5.0