1## TFLite accuracy library. 2 3This library provides evaluation pipelines that can be used to evaluate 4accuracy and other metrics of a model. The resulting binary can be run on 5a desktop or on a mobile device. 6 7## Usage 8The tool provides an evaluation pipeline with different stages. Each 9stage outputs a Tensorflow graph. 10A sample usage is shown below. 11 12```C++ 13// First build the pipeline. 14EvalPipelineBuilder builder; 15std::unique_ptr<EvalPipeline> eval_pipeline; 16auto status = builder.WithInput("pipeline_input", DT_FLOAT) 17 .WithInputStage(&input_stage) 18 .WithRunModelStage(&run_model_stage) 19 .WithPreprocessingStage(&preprocess_stage) 20 .WithAccuracyEval(&eval) 21 .Build(scope, &eval_pipeline); 22TF_CHECK_OK(status); 23 24// Now run the pipeline with inputs and outputs. 25std::unique_ptr<Session> session(NewSession(SessionOptions())); 26TF_CHECK_OK(eval_pipeline.AttachSession(std::move(session))); 27Tensor input = ... read input for the model ... 28Tensor ground_truth = ... read ground truth for the model ... 29TF_CHECK_OK(eval_pipeline.Run(input1, ground_truth1)); 30``` 31For further examples, check the usage in [imagenet accuracy evaluation binary](ilsvrc/imagenet_model_evaluator.cc) 32 33## Measuring accuracy of published models. 34 35### ILSVRC (Imagenet Large Scale Visual Recognition Contest) classification task 36For measuring accuracy for [ILSVRC 2012 image classification task](http://www.image-net.org/challenges/LSVRC/2012/), the binary can be built 37using these 38[instructions.](ilsvrc/) 39