Fix tflite_run tensor loader's raw data pointer type: unique_ptr of array
Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
file.read(reinterpret_cast<char *>(tensor_indices_raw), sizeof(tensor_indices_raw));
std::vector<int> tensor_indices(tensor_indices_raw, tensor_indices_raw + num_tensors);
- _raw_data = std::unique_ptr<float>(new float[file_size]);
+ _raw_data = std::unique_ptr<float[]>(new float[file_size]);
file.read(reinterpret_cast<char *>(_raw_data.get()), file_size);
size_t offset = 0;
private:
tflite::Interpreter &_interpreter;
- std::unique_ptr<float> _raw_data;
+ std::unique_ptr<float[]> _raw_data;
std::unordered_map<int, nnfw::tflite::TensorView<float>> _tensor_map;
};