From 39c2bae893b90505eb8d189cc150baaaa972de45 Mon Sep 17 00:00:00 2001 From: Leon Chen Date: Mon, 24 Oct 2016 00:36:45 -0400 Subject: [PATCH] update readme --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 04a1257..9f377e0 100644 --- a/README.md +++ b/README.md @@ -43,10 +43,18 @@ See `demos/src/` for source code of real examples written in VueJS. ```py model.save_weights('model.hdf5') with open('model.json', 'w') as f: - f.write(model.to_json()) + f.write(model.to_json()) ``` - See jupyter notebooks of demos for details: `demos/notebooks/`. + See jupyter notebooks of demos for details: `demos/notebooks/`. All that's required for [ResNet50](https://github.com/fchollet/keras/blob/master/keras/applications/resnet50.py), for example, is: + + ```py + from keras.applications import resnet50 + model = resnet50.ResNet50(include_top=True, weights='imagenet') + model.save_weights('resnet50.hdf5') + with open('resnet50.json', 'w') as f: + f.write(model.to_json()) + ``` 2. Run the encoder script on the HDF5 weights file: