public async Task <Inceptionv3Output> EvaluateAsync(Inceptionv3Input input) { binding.Bind("image", input.image); var result = await session.EvaluateAsync(binding, "0"); var output = new Inceptionv3Output(); output.classLabel = result.Outputs["classLabel"] as TensorString; output.classLabelProbs = result.Outputs["classLabelProbs"] as IList <Dictionary <string, float> >; return(output); }
public async Task <IMachineLearningOutput> EvaluateAsync(IMachineLearningInput input) { var modelInput = input as Inceptionv3Input; Binding.Bind("image", modelInput.image); var result = await Session.EvaluateAsync(Binding, "0"); var output = new Inceptionv3Output(); output.classLabel = result.Outputs["classLabel"] as TensorString; output.classLabelProbs = result.Outputs["classLabelProbs"] as IList <Dictionary <string, float> >; return(output); }