Giter VIP home page Giter VIP logo

Comments (6)

doubler avatar doubler commented on May 19, 2024

I have solved my problem by pre-define dropout_prob as a tf.constant before export the model.
While I'm still looking forward the multi input and output example. :)

from serving.

fangweili avatar fangweili commented on May 19, 2024

Unfortunately, neither our standard ClassificationSignature nor RegressionSignature supports multiple input binding for now. You can however, use GenericSignature to specify arbitrary number of inputs and outputs.

You can use exporter.generic_signature() to create it. Then provide it as default_signature in exporter.export().

from serving.

doubler avatar doubler commented on May 19, 2024

Got it. Thanks for explanation.

from serving.

insectatorious avatar insectatorious commented on May 19, 2024

@doubler would it be possible for you to share a code example of how you set the dropout_prob using tf.constant? I'm confused about how to fit this into the export step.

from serving.

doubler avatar doubler commented on May 19, 2024

@insectatorious no need to set the dropout_prob, just feed it with 1.0 as input when serving online

from serving.

fabienbaradel avatar fabienbaradel commented on May 19, 2024

@doubler I don't understand your explanation. What do you mean by "feed it with 1.0 as input"?

Below is the inception signature for a standard image classification:

      classification_signature = (
          tf.saved_model.signature_def_utils.build_signature_def(
              inputs={
                  tf.saved_model.signature_constants.CLASSIFY_INPUTS:
                      classify_inputs_tensor_info
              },
              outputs={
                  tf.saved_model.signature_constants.CLASSIFY_OUTPUT_CLASSES:
                      classes_output_tensor_info,
                  tf.saved_model.signature_constants.CLASSIFY_OUTPUT_SCORES:
                      scores_output_tensor_info
              },
              method_name=tf.saved_model.signature_constants.
              CLASSIFY_METHOD_NAME))

Could you show how is yours with two inputs? Do you have to redefine the tf.saved_mode.signature_constants?

Thanks for help.

from serving.

Related Issues (20)

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.