lukmanr / ml-inference Goto Github PK
View Code? Open in Web Editor NEWML Training on inference.
ML Training on inference.
Hello Sir,
I was following your medium blog titled "Optimizing TensorFlow Models for Serving" but when i am calling a function with directory as a parameter i am getting this below error.
OSError Traceback (most recent call last)
<ipython-input-11-8c172fe0bbb1> in <module>()
2 from tensorflow.python.saved_model import tag_constants
3 dir="frozen_east_text_detection.pb"
----> 4 x = get_graph_def_from_saved_model(dir)
4 frames
/usr/local/lib/python3.7/dist-packages/tensorflow/python/saved_model/loader_impl.py in parse_saved_model(export_dir)
119 "SavedModel file does not exist at: %s%s{%s|%s}" %
120 (export_dir, os.path.sep, constants.SAVED_MODEL_FILENAME_PBTXT,
--> 121 constants.SAVED_MODEL_FILENAME_PB))
122
123
OSError: SavedModel file does not exist at: frozen_east_text_detection.pb/{saved_model.pbtxt|saved_model.pb}
And mu model path is"/content/frozen_east_text_detection.pb"
Can you please help me out why i am getting this when i am passing the exact same absolute path while calling a function.
code:
def get_graph_def_from_saved_model(saved_model_dir):
with tf.Session() as session:
meta_graph_def = tf.saved_model.loader.load(
session,
tags=[tag_constants.SERVING],
export_dir=saved_model_dir
)
return meta_graph_def.graph_def
import tensorflow.compat.v1 as tf
from tensorflow.python.saved_model import tag_constants
dir="frozen_east_text_detection.pb"
get_graph_def_from_saved_model(dir)
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.