21.05
|
NumPy accessor class. More...
#include <GraphUtils.h>
Public Member Functions | |
NumPyAccessor (std::string npy_path, TensorShape shape, DataType data_type, DataLayout data_layout=DataLayout::NCHW, std::ostream &output_stream=std::cout) | |
Constructor. More... | |
NumPyAccessor (NumPyAccessor &&)=default | |
Allow instances of this class to be move constructed. More... | |
NumPyAccessor (const NumPyAccessor &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NumPyAccessor & | operator= (const NumPyAccessor &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
bool | access_tensor (ITensor &tensor) override |
Interface to be implemented to access a given tensor. More... | |
Public Member Functions inherited from ITensorAccessor | |
virtual | ~ITensorAccessor ()=default |
Default virtual destructor. More... | |
NumPy accessor class.
Definition at line 146 of file GraphUtils.h.
NumPyAccessor | ( | std::string | npy_path, |
TensorShape | shape, | ||
DataType | data_type, | ||
DataLayout | data_layout = DataLayout::NCHW , |
||
std::ostream & | output_stream = std::cout |
||
) |
Constructor.
[in] | npy_path | Path to npy file. |
[in] | shape | Shape of the numpy tensor data. |
[in] | data_type | DataType of the numpy tensor data. |
[in] | data_layout | (Optional) DataLayout of the numpy tensor data. |
[out] | output_stream | (Optional) Output stream |
Definition at line 180 of file GraphUtils.cpp.
References NumPyBinLoader::access_tensor(), TensorAllocator::allocate(), Tensor::allocator(), arm_compute::test::validation::data_layout, arm_compute::test::validation::data_type, arm_compute::test::validation::info, TensorAllocator::init(), and arm_compute::test::validation::shape.
|
default |
Allow instances of this class to be move constructed.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
overridevirtual |
Interface to be implemented to access a given tensor.
[in] | tensor | Tensor to be accessed |
Implements ITensorAccessor.
Definition at line 206 of file GraphUtils.cpp.
References ARM_COMPUTE_ERROR, ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN, ITensorInfo::data_type(), ITensorInfo::dimension(), arm_compute::F32, ITensor::info(), Tensor::info(), and arm_compute::QASYMM8.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)