Last active
May 7, 2024 21:32
-
-
Save iamsurya/b8e04bed2600df63c0674f2bfe22a6bc 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
from tensorflow.python.platform import gfile | |
with tf.Session() as sess: | |
with gfile.FastGFile('slopemodel/slopemodel.pb', 'rb') as f: | |
graph_def = tf.GraphDef() | |
graph_def.ParseFromString(f.read()) | |
sess.graph.as_default() | |
g_in = tf.import_graph_def(graph_def) | |
tensor_output = sess.graph.get_tensor_by_name('import/dense_2/Sigmoid:0') | |
tensor_input = sess.graph.get_tensor_by_name('import/dense_1_input:0') | |
predictions = sess.run(tensor_output, {tensor_input:sample}) | |
print(predictions) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
what is sample?