ONE - On-device Neural Engine
Loading...
Searching...
No Matches
CircleModel.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2025 Samsung Electronics Co., Ltd. All Rights Reserved
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef __CIRCLE_RESIZER_CIRCLE_MODEL_H__
18#define __CIRCLE_RESIZER_CIRCLE_MODEL_H__
19
20#include "Shape.h"
21
22#include <string>
23#include <memory>
24#include <vector>
25
26namespace luci
27{
28class Module;
29}
30
32{
33
38{
39public:
46 explicit CircleModel(const std::vector<uint8_t> &buffer);
47
54 explicit CircleModel(const std::string &model_path);
55
61
66
70 std::vector<Shape> input_shapes() const;
71
76 std::vector<Shape> output_shapes() const;
77
84 void save(std::ostream &stream);
85
92 void save(const std::string &output_path);
93
94private:
95 std::unique_ptr<luci::Module> _module;
96};
97
98} // namespace circle_resizer
99
100#endif // __CIRCLE_RESIZER_CIRCLE_MODEL_H__
luci::Module * module()
Get the loaded model in luci::Module representation.
std::vector< Shape > input_shapes() const
Get input shapes of the loaded model.
~CircleModel()
Dtor of CircleModel. Note that explicit declaration is needed to satisfy forward declaration + unique...
std::vector< Shape > output_shapes() const
Get output shapes of the loaded model.
void save(std::ostream &stream)
Save the model to the output stream.
Collection of 'loco::Graph's.
Definition Module.h:33