Giter Site home page Giter Site logo

ml-inference's People

Contributors

lukmanr avatar

Stargazers

 avatar

Watchers

 avatar

ml-inference's Issues

OSError: SavedModel file does not exist at

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.