Last active
August 18, 2020 02:16
-
-
Save hamletbatista/e7641ebcbaeea432eb14061a9c3babe9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Here we combine both lists into a single set of unique phrases | |
messages = set(df_404s["phrase"].to_list() + df_canonicals["phrase"].to_list()) | |
messages = list(messages)[:-1] | |
similarity_input_placeholder = tf.placeholder(tf.string, shape=(None)) | |
similarity_message_encodings = embed(similarity_input_placeholder) | |
with tf.Session() as session: | |
session.run(tf.global_variables_initializer()) | |
session.run(tf.tables_initializer()) | |
# We are truncating the messages list to 15 to simplify the visualization | |
run_and_plot(session, similarity_input_placeholder, messages[:15], | |
similarity_message_encodings) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
AttributeError: module 'tensorflow' has no attribute 'placeholder'