There now follows a series of functions leading eventually up to the main function that performs the style transfer (run_style_transfer()).
The first function in this sequence, get_model(), creates the model we are going to use.
It first loads trained vgg_model (which has been trained on ImageNet) without its classification layer (include_top=False). Next, it freezes the loaded model (vgg_model.trainable = False).
The style and content layer output values are then acquired using list comprehensions, which iterate over the names of the layers that we specified in the previous section.
These output values are then used, together with the VGG input to create our new model with access to VGG layers, that is, get_model() returns a Keras model that outputs the style and content intermediate layers of the trained VGG19 model. It is unnecessary to use the top layer...