Skip to content

Instantly share code, notes, and snippets.

@shshemi
Last active August 28, 2019 04:09
Show Gist options
  • Save shshemi/c4c2cbc5430a38023a83ea0860b81d7e to your computer and use it in GitHub Desktop.
Save shshemi/c4c2cbc5430a38023a83ea0860b81d7e to your computer and use it in GitHub Desktop.
model.load_weights("best_weights.h5")
img = np.expand_dims(img_to_array(load_img("tony_stark.jpg")) / 255.0, axis=0)
sen = ascii_encode('Anthony Edward "Tony" Stark is a character portrayed by Robert Downey Jr. in the MCU film franchise', sentence_len)
y_img = encoder.predict([img, sen])
y_sen = decoder.predict(y_img)
dec_sen = ascii_decode(y_sen)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment