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 */
| 331 | * @return An appropriate tensor accessor |
| 332 | */ |
| 333 | inline 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 */ |
| 349 | template <typename D> |
no test coverage detected