diff options
Diffstat (limited to 'utils/GraphUtils.cpp')
-rw-r--r-- | utils/GraphUtils.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/GraphUtils.cpp b/utils/GraphUtils.cpp index dad9aed6a5..00165cd6c2 100644 --- a/utils/GraphUtils.cpp +++ b/utils/GraphUtils.cpp @@ -140,12 +140,14 @@ bool DummyAccessor::access_tensor(ITensor &tensor) return ret; } -NumPyAccessor::NumPyAccessor(std::string npy_path, TensorShape shape, DataType data_type, std::ostream &output_stream) +NumPyAccessor::NumPyAccessor(std::string npy_path, TensorShape shape, DataType data_type, DataLayout data_layout, std::ostream &output_stream) : _npy_tensor(), _filename(std::move(npy_path)), _output_stream(output_stream) { - NumPyBinLoader loader(_filename); + NumPyBinLoader loader(_filename, data_layout); TensorInfo info(shape, 1, data_type); + info.set_data_layout(data_layout); + _npy_tensor.allocator()->init(info); _npy_tensor.allocator()->allocate(); |