I have a keras model (already trained) that I want to split to two parts (one part computes internal representation from the original inputs, and the other part computes the output from the precomputed internal representation)
getting the 1st part is simple (input to internal representation) but the second part is problematic
I found two related answers, but they are problematic in my case
the methods described in these answers are:
in this solution you redefine the second part of the network - this appears feasible, but requires a significant amount of code duplication (the network is quite complex)
in this solution the model is defined by composition of two models - this looks like a good solution, but not relevant for an existing trained network