Reputation: 13
I've been using this tutorial from TensorFlow's site to create a script (python3) that performs a style transfer. I'm trying to train a model on a particular art piece and then apply that style to any random photo. From my understanding of this tutorial the script takes a style image and a content image, runs them through the VGG19 model and spits out a final image (takes about 30min on my machine). But I see no way to save the trained model to apply it to another content photo. This tutorial doesn't use TF's model fit()
, predict()
, and save()
methods like I would expect. It just seems to be applying the prediction to the image as it trains.
How do I save the trained model? Once saved how do I use it on another content photo?
Upvotes: 1
Views: 189
Reputation: 6377
Use model.save()
method.
Read this tutorial: https://www.tensorflow.org/guide/keras/save_and_serialize
Upvotes: 0