Files
2016-10-24 00:49:50 -04:00

2.2 KiB

In [1]:
WEIGHTS_FILEPATH = 'xception.hdf5'
MODEL_ARCH_FILEPATH = 'xception.json'
In [2]:
from keras.applications import xception, imagenet_utils
Using TensorFlow backend.
In [3]:
input_shape = (299, 299, 3)

model = xception.Xception(include_top=True, weights='imagenet')
Downloading data from https://github.com/fchollet/deep-learning-models/releases/download/v0.4/xception_weights_tf_dim_ordering_tf_kernels.h5
91889664/91884032 [==============================] - 22s    
In [4]:
model.save_weights(WEIGHTS_FILEPATH)

with open(MODEL_ARCH_FILEPATH, 'w') as f:
    f.write(model.to_json())
In [ ]: