ONE - On-device Neural Engine
|
#include "Common.h"
Go to the source code of this file.
Functions | |
std::string | mangle (const std::string &name) |
Construct HDF5-compatible dataset name from a given string. | |
std::string | value_grpname (void) |
Return the name of "value group". | |
std::string | value_filename (uint32_t n) |
Return the name of n-th tensor dataset. | |
std::string | name_grpname (void) |
Return the name of "name group". | |
std::string | name_filename (uint32_t n) |
Return the name of n-th tensor attribute. | |
std::string mangle | ( | const std::string & | name | ) |
Construct HDF5-compatible dataset name from a given string.
When someone attempts to access 'A/B/C' dataset, HDF5 tries to open dataset C in group B in top-level group A, which menas that dataset names SHOULD NOT contain '/' in it.
This mangle function replaces all the occurence of '/' in a given string with '_' to construct HDF5-compatible dataset name.
Definition at line 19 of file Common.cpp.
Referenced by circletensordump::DumpTensorsToHdf5::run().
std::string name_filename | ( | uint32_t | n | ) |
Return the name of n-th tensor attribute.
Definition at line 38 of file Common.cpp.
std::string name_grpname | ( | void | ) |
Return the name of "name group".
Definition at line 37 of file Common.cpp.
Referenced by HD5ExportAction::HD5ExportAction().
std::string value_filename | ( | uint32_t | n | ) |
Return the name of n-th tensor dataset.
Definition at line 35 of file Common.cpp.
Referenced by HD5ExportAction::run(), and HD5ImportAction::run().
std::string value_grpname | ( | void | ) |
Return the name of "value group".
Definition at line 34 of file Common.cpp.
Referenced by entry(), HD5ExportAction::HD5ExportAction(), and HD5ImportAction::HD5ImportAction().