mtcnn icon indicating copy to clipboard operation
mtcnn copied to clipboard

Hi, I have questions :)

Open xanderjakeq opened this issue 3 years ago • 1 comments

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!

xanderjakeq avatar Mar 02 '22 21:03 xanderjakeq

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

cetra3 avatar Mar 31 '22 00:03 cetra3