neural-style / download_model.py
dogeplusplus's picture
Adding checklist of dependencies, and slimmed down code to download style transfer model.
a1ded73
raw
history blame contribute delete
252 Bytes
import os
import tensorflow as tf
import tensorflow_hub as hub
os.environ['TFHUB_MODEL_LOAD_FORMAT'] = 'COMPRESSED'
hub_model = hub.load('https://tfhub.dev/google/magenta/arbitrary-image-stylization-v1-256/2')
tf.saved_model.save(hub_model, 'style/1')