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

Method NumPyAccessor

utils/GraphUtils.cpp:188–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186}
187
188NumPyAccessor::NumPyAccessor(
189 std::string npy_path, TensorShape shape, DataType data_type, DataLayout data_layout, std::ostream &output_stream)
190 : _npy_tensor(), _filename(std::move(npy_path)), _output_stream(output_stream)
191{
192 NumPyBinLoader loader(_filename, data_layout);
193
194 TensorInfo info(shape, 1, data_type);
195 info.set_data_layout(data_layout);
196
197 _npy_tensor.allocator()->init(info);
198 _npy_tensor.allocator()->allocate();
199
200 loader.access_tensor(_npy_tensor);
201}
202
203template <typename T>
204void NumPyAccessor::access_numpy_tensor(ITensor &tensor, T tolerance)

Callers

nothing calls this directly

Calls 4

initMethod · 0.45
allocatorMethod · 0.45
allocateMethod · 0.45
access_tensorMethod · 0.45

Tested by

no test coverage detected