Closed
Description
When a keras.models.Model
instance is initialized from the input
attribute from another Model
that was constructed by passing an intermediate symbolic tensor that was an output of another external layer as the input, the resulting Model
incorrectly includes layers that were used to construct the intermediate input tensor.
I'm afraid the above sentence will amount to little more than gibberish without an example, so please refer to the following notebook:
https://colab.research.google.com/drive/1lfif-YosIn4wgzL8t8WjX520C_0eDTGV?usp=sharing
The notebook illustrates a simplified version of a text processing scenario, in which the full model is split into a preprocessing portion and a trainable portion.