You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have trained a SSD MobileNet V2 FPNLite 640x640 pretrained model in Tensorflow 2.4 with my own data and exported as saved model .The inference and image object detection prediction is working perfectly fine in python .
Im trying to do the same in Tensorflow.Net using the below code :
Session session = Session.LoadFromSavedModel(@"........\saved_model");
Tensor tensorNum = graph.OperationByName("num_detections");
Tensor tensorBoxes = graph.OperationByName("detection_boxes");
Tensor tensorScores = graph.OperationByName("detection_scores");
Tensor tensorClasses = graph.OperationByName("detection_classes");
Tensor imgTensor = graph.OperationByName("image_tensor");
Tensor[] outTensorArr = new Tensor[] { tensorNum, tensorBoxes, tensorScores, tensorClasses };
Im getting below weird error:
Tensorflow.ValueError: 'Could not find operation "num_detections" inside graph "grap-key-1/".'
I tried to loop the graph operations of the session but there is nothing in there .
Why this is happening ,it is the same model Im using in python and giving correct results .
Appreciate any help
Regards
Ayad
The text was updated successfully, but these errors were encountered:
Hello ,
I have trained a SSD MobileNet V2 FPNLite 640x640 pretrained model in Tensorflow 2.4 with my own data and exported as saved model .The inference and image object detection prediction is working perfectly fine in python .
Im trying to do the same in Tensorflow.Net using the below code :
Session session = Session.LoadFromSavedModel(@"........\saved_model");
Tensor tensorNum = graph.OperationByName("num_detections");
Tensor tensorBoxes = graph.OperationByName("detection_boxes");
Tensor tensorScores = graph.OperationByName("detection_scores");
Tensor tensorClasses = graph.OperationByName("detection_classes");
Tensor imgTensor = graph.OperationByName("image_tensor");
Tensor[] outTensorArr = new Tensor[] { tensorNum, tensorBoxes, tensorScores, tensorClasses };
Im getting below weird error:
Tensorflow.ValueError: 'Could not find operation "num_detections" inside graph "grap-key-1/".'
I tried to loop the graph operations of the session but there is nothing in there .
Why this is happening ,it is the same model Im using in python and giving correct results .
Appreciate any help
Regards
Ayad
The text was updated successfully, but these errors were encountered: