24.02.1
|
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... | |
virtual bool | access_tensor_data () |
Returns true if the tensor data is being accessed. More... | |
NumPy accessor class.
Definition at line 147 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 188 of file GraphUtils.cpp.
References NumPyBinLoader::access_tensor(), TensorAllocator::allocate(), Tensor::allocator(), arm_compute::cpu::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 217 of file GraphUtils.cpp.
References ARM_COMPUTE_ERROR, ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN, ITensorInfo::dimension(), arm_compute::F32, Tensor::info(), arm_compute::QASYMM8, and tensor.
Referenced by VerifyAccessor< D >::access_tensor().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)