MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / get_detection_output_accessor

Function get_detection_output_accessor

utils/GraphUtils.h:582–603  ·  view source on GitHub ↗

Generates appropriate output accessor according to the specified graph parameters * * @note If the output accessor is requested to validate the graph then ValidationOutputAccessor is generated * else if output_accessor_file is empty will generate a DummyAccessor else will generate a TopNPredictionsAccessor * * @param[in] graph_parameters Graph parameters * @param[in] tensor_shapes

Source from the content-addressed store, hash-verified

580 * @return An appropriate tensor accessor
581 */
582inline std::unique_ptr<graph::ITensorAccessor>
583get_detection_output_accessor(const arm_compute::utils::CommonGraphParams &graph_parameters,
584 std::vector<TensorShape> tensor_shapes,
585 bool is_validation = false,
586 std::ostream &output_stream = std::cout)
587{
588 ARM_COMPUTE_UNUSED(is_validation);
589 if (!graph_parameters.validation_file.empty())
590 {
591 return std::make_unique<ValidationOutputAccessor>(graph_parameters.validation_file, output_stream,
592 graph_parameters.validation_range_start,
593 graph_parameters.validation_range_end);
594 }
595 else if (graph_parameters.labels.empty())
596 {
597 return std::make_unique<DummyAccessor>(0);
598 }
599 else
600 {
601 return std::make_unique<DetectionOutputAccessor>(graph_parameters.labels, tensor_shapes, output_stream);
602 }
603}
604/** Generates appropriate npy output accessor according to the specified npy_path
605 *
606 * @note If npy_path is empty will generate a DummyAccessor else will generate a NpyAccessor

Callers 1

create_graph_floatMethod · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected