Compute Library
18.05
|
NumPy accessor class. More...
#include <GraphUtils.h>
Public Member Functions | |
NumPyAccessor (std::string npy_path, TensorShape shape, DataType data_type, 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 123 of file GraphUtils.h.
NumPyAccessor | ( | std::string | npy_path, |
TensorShape | shape, | ||
DataType | data_type, | ||
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. |
[out] | output_stream | (Optional) Output stream |
Definition at line 132 of file GraphUtils.cpp.
References NumPyBinLoader::access_tensor(), TensorAllocator::allocate(), Tensor::allocator(), ITensor::info(), arm_compute::test::validation::info(), TensorAllocator::init(), and ITensorInfo::total_size().
|
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 154 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(), and Tensor::info().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)