Customvision run trained tensorflow model in Python: Placeholder:0 refers to a non existing tensor in image classification

MarynaW 96 Reputation points
2021-05-25T10:37:52.9+00:00

Hi all,

I have trained an image classifier with the customvision service, which worked as charm. Now I would like to run the model inference locally with a python script on my PC. Therefore I have been following the tutorial on https://video2.skills-academy.com/en-us/azure/cognitive-services/custom-vision-service/export-model-python

I am having troubles with sess.graph.get_tensor_by_name('Placeholder:0').shape.as_list()

Could you please provide some information on the system requirements and the python package versions? An openCV 4.5.1 C++ code snippet on how to consume the downloaded model would be also great if possible.

I am using Python 3.8.5

Thank you

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
2,892 questions
Azure AI Custom Vision
Azure AI Custom Vision
An Azure artificial intelligence service and end-to-end platform for applying computer vision to specific domains.
247 questions
{count} votes

Accepted answer
  1. MarynaW 96 Reputation points
    2021-05-26T07:34:21.963+00:00

    Thank you, will do.

    I have solved the issue with using C++ openCV instead and WinML also helps with rapid prototyping.

    This was a particularly good example I have found:

    https://github.com/Azure-Samples/cognitive-services-onnx-customvision-sample

    Would be great to have more of those.

    Best.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.