|
23 | 23 |
|
24 | 24 | namespace ngraph |
25 | 25 | { |
26 | | - std::string serialize(std::shared_ptr<ngraph::Function>, |
27 | | - size_t indent = 0, |
28 | | - bool binary_constant_data = false); |
29 | | - void serialize(const std::string& path, std::shared_ptr<ngraph::Function>, size_t indent = 0); |
30 | | - void serialize(std::ostream& out, std::shared_ptr<ngraph::Function>, size_t indent = 0); |
31 | | - |
32 | | - std::shared_ptr<ngraph::Function> deserialize(std::istream&); |
33 | | - std::shared_ptr<ngraph::Function> deserialize(const std::string&); |
| 26 | + // @brief Serialize a Function to a json string |
| 27 | + // @param func The Function to serialize |
| 28 | + // @param indent If 0 then there is no formatting applied and the resulting string is the |
| 29 | + // most compact representation. If non-zero then the json string is formatted with the |
| 30 | + // indent level specified. |
| 31 | + std::string serialize(std::shared_ptr<ngraph::Function> func, size_t indent = 0); |
| 32 | + |
| 33 | + // @brief Serialize a Function to as a json file |
| 34 | + // @param path The path to the output file |
| 35 | + // @param func The Function to serialize |
| 36 | + // @param indent If 0 then there is no formatting applied and the resulting string is the |
| 37 | + // most compact representation. If non-zero then the json string is formatted with the |
| 38 | + // indent level specified. |
| 39 | + void serialize(const std::string& path, |
| 40 | + std::shared_ptr<ngraph::Function> func, |
| 41 | + size_t indent = 0); |
| 42 | + |
| 43 | + // @brief Serialize a Function to a CPIO file with all constant data stored as binary |
| 44 | + // @param out The output stream to which the data is serialized. |
| 45 | + // @param func The Function to serialize |
| 46 | + // @param indent If 0 then there is no formatting applied and the json is the |
| 47 | + // most compact representation. If non-zero then the json is formatted with the |
| 48 | + // indent level specified. |
| 49 | + void serialize(std::ostream& out, std::shared_ptr<ngraph::Function> func, size_t indent = 0); |
| 50 | + |
| 51 | + // @brief Deserialize a Function |
| 52 | + // @param in An isteam to the input data |
| 53 | + std::shared_ptr<ngraph::Function> deserialize(std::istream& in); |
| 54 | + |
| 55 | + // @brief Deserialize a Function |
| 56 | + // @param str The json formatted string to deseriailze. |
| 57 | + std::shared_ptr<ngraph::Function> deserialize(const std::string& str); |
34 | 58 | } |
0 commit comments