Closed matthewchung74 closed 5 years ago
Using Keras 2.2.4, I'm working my way though this notebook 5.4-visualizing-what-convnets-learn , except I switched the model with a unet one provided by Kaggle-Carvana-Image-Masking-Challenge . The first layer of the Kaggle model looks like this, followed by the rest of the example code.
def get_unet_512(input_shape=(512, 512, 3), num_classes=1): inputs = Input(shape=input_shape) ... Layer (type) Output Shape Param # Connected to ================================================================================================== input_13 (InputLayer) (None, 512, 512, 3) 0 ... from keras import models layer_outputs = [layer.output for layer in model.layers[:8]] activation_model = models.Model(inputs=model.input, outputs=layer_outputs) activations = activation_model.predict(img_tensor)
Now the error I am getting is
InvalidArgumentError: input_13:0 is both fed and fetched.
Does anyone have any suggestions on how to work around this?
in case anyone else comes across this issue, i ended up doing this
layer_outputs = [layer.output for layer in model.layers[1:8]]
@foobar8675 : thanks for giving solution for this....
Using Keras 2.2.4, I'm working my way though this notebook 5.4-visualizing-what-convnets-learn , except I switched the model with a unet one provided by Kaggle-Carvana-Image-Masking-Challenge . The first layer of the Kaggle model looks like this, followed by the rest of the example code.
Now the error I am getting is
Does anyone have any suggestions on how to work around this?