Model inputs must come from `tf.keras.Input` …, they cannot be the output of a previous non-Input layer
问题 I'm using Python 3.7.7. and Tensorflow 2.1.0. I have a pre-trained U-Net network, and I want to get its encoder and its decoder . In the following picture: You can see a convolutional encoder-decoder architecture. I want to get the encoder part, that is, the layers that appears on the left of the image: And the decoder part: I get the U-Net model from this function: def get_unet_uncompiled(img_shape = (200,200,1)): inputs = Input(shape=img_shape) conv1 = Conv2D(64, (5, 5), activation='relu',