Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi, I have questions :) #4

Open
xanderjakeq opened this issue Mar 2, 2022 · 1 comment
Open

Hi, I have questions :) #4

xanderjakeq opened this issue Mar 2, 2022 · 1 comment

Comments

@xanderjakeq
Copy link

I saw your blog post on using tensorflow with rust. I'm trying to use your code as a template and use this model instead. This is the .pb file I'm using from the repo.

(also I'm a beginner with rust and ml/tensorflow)
I am having trouble doing it which led me to a few questions:

  • How do you figure out the required inputs/parameters and their shape for a model?
  • The same for the outputs

if they're not well documented.

Thanks for your time!

@cetra3
Copy link
Owner

cetra3 commented Mar 31, 2022

That's a good question! I think there is a few cli apps in tensorflow that will allow you to enumerate a pb model:

https://www.tensorflow.org/guide/saved_model#overview_of_commands

They have an example of listing inputs/outputs here.

$ saved_model_cli show --dir \
/tmp/saved_model_dir --tag_set serve --signature_def serving_default
The given SavedModel SignatureDef contains the following input(s):
  inputs['x'] tensor_info:
      dtype: DT_FLOAT
      shape: (-1, 1)
      name: x:0
The given SavedModel SignatureDef contains the following output(s):
  outputs['y'] tensor_info:
      dtype: DT_FLOAT
      shape: (-1, 1)
      name: y:0
Method name is: tensorflow/serving/predict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants