Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vizualization on Squeezedet #27

Open
alexandruvesa opened this issue Jul 9, 2019 · 0 comments
Open

Vizualization on Squeezedet #27

alexandruvesa opened this issue Jul 9, 2019 · 0 comments

Comments

@alexandruvesa
Copy link

alexandruvesa commented Jul 9, 2019

Hello Everybody,
I'm trying to vizualize some representations.

`import numpy as np
import random
from tensorflow.keras.preprocessing.image import img_to_array, load_img
from tensorflow.keras import layers,models
from keras.preprocessing.image import ImageDataGenerator
import tensorflow as tf

successive_outputs = [layer.output for layer in squeeze.model.layers[1:]]
visualization_model = tf.keras.Model(inputs = squeeze.model.input, outputs = successive_outputs)`

When visualization_model is called the following error comes:
`
visualization_model = tf.keras.Model(inputs = squeeze.model.input, outputs = successive_outputs)
Traceback (most recent call last):

File "", line 1, in
visualization_model = tf.keras.Model(inputs = squeeze.model.input, outputs = successive_outputs)

File "C:\ICMS\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\keras\engine\training.py", line 121, in init
super(Model, self).init(*args, **kwargs)

File "C:\ICMS\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\keras\engine\network.py", line 81, in init
self._init_graph_network(*args, **kwargs)

File "C:\ICMS\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\training\checkpointable\base.py", line 442, in _method_wrapper
method(self, *args, **kwargs)

File "C:\ICMS\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\keras\engine\network.py", line 227, in _init_graph_network
self._track_layers(layers)

File "C:\ICMS\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\keras\engine\network.py", line 327, in _track_layers
layer, name='layer-%d' % layer_index, overwrite=True)

File "C:\ICMS\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\training\checkpointable\base.py", line 688, in _track_checkpointable
"Checkpointable.") % (type(checkpointable),))

TypeError: Checkpointable._track_checkpointable() passed type <class 'keras.engine.input_layer.InputLayer'>, not a Checkpointable.`

Thanks a lot for help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant