TensorFlowSharp icon indicating copy to clipboard operation
TensorFlowSharp copied to clipboard

Crashed when call runner.Run() multiple time.

Open guoguoguilai opened this issue 5 years ago • 2 comments

When I called runner.Run() frequently, it just crashed. Is there any solution to this?

guoguoguilai avatar Oct 12 '19 17:10 guoguoguilai

Do you dispose output from runner.Run() ? Need more info.

kbegiedza avatar Nov 29 '19 13:11 kbegiedza

Follwing is my usage and I didn't meet the problem.

public int Predict(Bitmap bmp) { var tensor = Bitmap2Ttensor(bmp); var runner = session.GetRunner(); string[] labels = File.ReadAllLines(labelPath); runner .AddInput(graph["image_tensor"][0], tensor) .Fetch( graph["detection_boxes"][0], graph["detection_scores"][0], graph["detection_classes"][0], graph["num_detections"][0]); var output = runner.Run(); //to do }

weiSupreme avatar Dec 17 '19 13:12 weiSupreme