In [1]:
WEIGHTS_FILEPATH = 'resnet50.hdf5'
MODEL_ARCH_FILEPATH = 'resnet50.json'

In [2]:
from keras.applications import resnet50, imagenet_utils


Using TensorFlow backend.

In [3]:
input_shape = (224, 224, 3)

model = resnet50.ResNet50(include_top=True, weights='imagenet')

In [4]:
model.save_weights(WEIGHTS_FILEPATH)

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

In [ ]: