Skip to content

Instantly share code, notes, and snippets.

@dcshapiro
Created November 28, 2017 00:55
Show Gist options
  • Save dcshapiro/e807e21f8b3329fde50548a0d7b0b8c4 to your computer and use it in GitHub Desktop.
Save dcshapiro/e807e21f8b3329fde50548a0d7b0b8c4 to your computer and use it in GitHub Desktop.
%%time
for i in range(100):
img = image.load_img(img_path, target_size=(224, 224))
x_i = preprocess_input(np.expand_dims(image.img_to_array(img), axis=0))
block4_pool_features = model.predict(x_i)
features=(decode_predictions(block4_pool_features,top=0)[0])
print(features)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment