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

Function get_accessor

tests/validate_examples/graph_validate_utils.h:333–346  ·  view source on GitHub ↗

Generates appropriate accessor according to the specified graph parameters * * @param[in] tensor Tensor parameters * @param[in] lower Lower random values bound * @param[in] upper Upper random values bound * @param[in] seed Random generator seed * * @return An appropriate tensor accessor */

Source from the content-addressed store, hash-verified

331 * @return An appropriate tensor accessor
332 */
333inline std::unique_ptr<graph::ITensorAccessor> get_accessor(const TensorParams &tensor,
334 PixelValue lower,
335 PixelValue upper,
336 const std::random_device::result_type seed = 0)
337{
338 if (!tensor.npy.empty())
339 {
340 return std::make_unique<arm_compute::graph_utils::NumPyBinLoader>(tensor.npy);
341 }
342 else
343 {
344 return std::make_unique<arm_compute::graph_utils::RandomAccessor>(lower, upper, seed);
345 }
346}
347
348/** Graph example validation accessor class */
349template <typename D>

Callers 3

GraphFunctionLayerMethod · 0.85
GraphFunctionLayerMethod · 0.85
do_setupMethod · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected