ONE - On-device Neural Engine
|
Data Structures | |
struct | TrainConfigFileData |
struct | TrainData |
struct | TrainResult |
Typedefs | |
using | DataBuffer = std::vector< char > |
Enumerations | |
enum | OpTrainableRank { ALL = 0 , ONLY_BIAS = 1 , UP_1_2_PART = 2 , LOWER_1_2_PART = 3 , MAX_VALUE = 4 } |
Functions | |
onert_micro::OMStatus | findBestTrainableOpIndexes (onert_micro::OMConfig &config, TrainData &train_data, std::unordered_set< uint16_t > &best_trainable_op_indexes) |
bool | cmpTrainResults (const training_configure_tool::TrainResult &left, const training_configure_tool::TrainResult &right, const float acceptable_diff) |
std::unordered_set< uint16_t > | findAllTrainableOps (const char *circle_model_path) |
std::vector< std::unordered_set< uint16_t > > | generateAllPossibleOpIndexesSets (const std::unordered_set< uint16_t > &initial_train_op_indexes) |
std::vector< std::unordered_set< uint16_t > > | selectOpIndexesSetsAccordingToMemoryRestriction (const std::vector< std::unordered_set< uint16_t > > &op_indexes_sets, onert_micro::OMConfig config, training_configure_tool::TrainData train_data) |
std::vector< std::unordered_map< uint16_t, OpTrainableRank > > | findAllTensorsRanksCombinations (const std::unordered_set< uint16_t > &selected_op_indexes, onert_micro::OMConfig config, training_configure_tool::TrainData train_data) |
onert_micro::OMStatus | findBestSparseBackpropagationTensorsRanks (onert_micro::OMConfig &config, TrainData &train_data, const std::unordered_set< uint16_t > &selected_op_indexes, std::unordered_map< uint16_t, OpTrainableRank > &best_train_ranks) |
void | readDataFromFile (const std::string &filename, char *data, size_t data_size, size_t start_position=0) |
void | writeDataToFile (const std::string &filename, const char *data, size_t data_size) |
DataBuffer | readFile (const char *path) |
onert_micro::OMStatus | createResultFile (const TrainConfigFileData &train_data, const char *save_path) |
onert_micro::OMStatus | createResultData (const TrainConfigFileData &train_data, std::vector< char > &result_buffer) |
onert_micro::OMStatus | runTrainProcessWithCurConfig (onert_micro::OMConfig &config, const training_configure_tool::TrainData &train_data, TrainResult &train_result) |
using training_configure_tool::DataBuffer = typedef std::vector<char> |
Definition at line 30 of file TrainingConfigureFileHandler.h.
Enumerator | |
---|---|
ALL | |
ONLY_BIAS | |
UP_1_2_PART | |
LOWER_1_2_PART | |
MAX_VALUE |
Definition at line 34 of file TrainConfigData.h.
bool training_configure_tool::cmpTrainResults | ( | const training_configure_tool::TrainResult & | left, |
const training_configure_tool::TrainResult & | right, | ||
const float | acceptable_diff | ||
) |
Definition at line 155 of file SparseBackpropagationHelper.cpp.
References onert_micro::ACCURACY, training_configure_tool::TrainResult::best_metrics_results, onert_micro::CROSS_ENTROPY_METRICS, onert_micro::MAE_METRICS, onert_micro::MSE_METRICS, and training_configure_tool::TrainResult::peak_memory_footprint.
Referenced by findBestSparseBackpropagationTensorsRanks(), and findBestTrainableOpIndexes().
onert_micro::OMStatus training_configure_tool::createResultData | ( | const TrainConfigFileData & | train_data, |
std::vector< char > & | result_buffer | ||
) |
Definition at line 155 of file TrainingConfigureFileHandler.cpp.
References onert_micro::Ok.
Referenced by findBestSparseBackpropagationTensorsRanks(), findBestTrainableOpIndexes(), and selectOpIndexesSetsAccordingToMemoryRestriction().
onert_micro::OMStatus training_configure_tool::createResultFile | ( | const TrainConfigFileData & | train_data, |
const char * | save_path | ||
) |
Definition at line 132 of file TrainingConfigureFileHandler.cpp.
References onert_micro::Ok, and onert_micro::UnknownError.
Referenced by entry().
std::vector< std::unordered_map< uint16_t, training_configure_tool::OpTrainableRank > > training_configure_tool::findAllTensorsRanksCombinations | ( | const std::unordered_set< uint16_t > & | selected_op_indexes, |
onert_micro::OMConfig | config, | ||
training_configure_tool::TrainData | train_data | ||
) |
Definition at line 327 of file SparseBackpropagationHelper.cpp.
References training_configure_tool::TrainData::circle_model_path, onert_micro::Ok, onert_micro::core::reader::OMCircleReader::parse(), readFile(), and onert_micro::core::reader::OMCircleReader::select_subgraph().
Referenced by findBestSparseBackpropagationTensorsRanks().
std::unordered_set< uint16_t > training_configure_tool::findAllTrainableOps | ( | const char * | circle_model_path | ) |
Definition at line 276 of file SparseBackpropagationHelper.cpp.
References onert_micro::Ok, onert_micro::core::reader::OMCircleReader::opcodes(), onert_micro::core::reader::OMCircleReader::operators(), onert_micro::core::reader::OMCircleReader::parse(), readFile(), onert_micro::core::reader::OMCircleReader::select_subgraph(), and size.
Referenced by findBestTrainableOpIndexes().
OMStatus training_configure_tool::findBestSparseBackpropagationTensorsRanks | ( | onert_micro::OMConfig & | config, |
TrainData & | train_data, | ||
const std::unordered_set< uint16_t > & | selected_op_indexes, | ||
std::unordered_map< uint16_t, OpTrainableRank > & | best_train_ranks | ||
) |
Definition at line 35 of file TensorRankSparseBackpropagationHandler.cpp.
References training_configure_tool::TrainData::acceptable_diff, training_configure_tool::TrainResult::best_metrics_results, cmpTrainResults(), createResultData(), onert_micro::CROSS_ENTROPY_METRICS, findAllTensorsRanksCombinations(), onert_micro::Ok, training_configure_tool::TrainResult::peak_memory_footprint, and runTrainProcessWithCurConfig().
Referenced by entry().
OMStatus training_configure_tool::findBestTrainableOpIndexes | ( | onert_micro::OMConfig & | config, |
training_configure_tool::TrainData & | train_data, | ||
std::unordered_set< uint16_t > & | best_trainable_op_indexes | ||
) |
Definition at line 30 of file SparseBackpropagationHandler.cpp.
References training_configure_tool::TrainData::acceptable_diff, training_configure_tool::TrainResult::best_metrics_results, training_configure_tool::TrainData::circle_model_path, cmpTrainResults(), createResultData(), onert_micro::CROSS_ENTROPY_METRICS, findAllTrainableOps(), generateAllPossibleOpIndexesSets(), onert_micro::Ok, training_configure_tool::TrainResult::peak_memory_footprint, runTrainProcessWithCurConfig(), selectOpIndexesSetsAccordingToMemoryRestriction(), and onert_micro::UnknownError.
Referenced by entry().
std::vector< std::unordered_set< uint16_t > > training_configure_tool::generateAllPossibleOpIndexesSets | ( | const std::unordered_set< uint16_t > & | initial_train_op_indexes | ) |
Definition at line 261 of file SparseBackpropagationHelper.cpp.
Referenced by findBestTrainableOpIndexes().
void training_configure_tool::readDataFromFile | ( | const std::string & | filename, |
char * | data, | ||
size_t | data_size, | ||
size_t | start_position = 0 |
||
) |
Definition at line 76 of file TrainingConfigureFileHandler.cpp.
Referenced by runTrainProcessWithCurConfig().
training_configure_tool::DataBuffer training_configure_tool::readFile | ( | const char * | path | ) |
Definition at line 104 of file TrainingConfigureFileHandler.cpp.
Referenced by findAllTensorsRanksCombinations(), findAllTrainableOps(), and runTrainProcessWithCurConfig().
OMStatus training_configure_tool::runTrainProcessWithCurConfig | ( | onert_micro::OMConfig & | config, |
const training_configure_tool::TrainData & | train_data, | ||
TrainResult & | train_result | ||
) |
Definition at line 40 of file TrainingDriverHandler.cpp.
References onert_micro::ACCURACY, training_configure_tool::TrainResult::best_metrics_results, training_configure_tool::TrainData::circle_model_path, onert_micro::CROSS_ENTROPY_METRICS, onert_micro::OMTrainingInterpreter::evaluateMetric(), onert_micro::OMTrainingInterpreter::getInputSizeAt(), onert_micro::OMTrainingInterpreter::getOutputSizeAt(), onert_micro::OMTrainingInterpreter::importTrainModel(), training_configure_tool::TrainData::input_input_test_data_path, training_configure_tool::TrainData::input_input_train_data_path, training_configure_tool::TrainData::input_target_test_data_path, training_configure_tool::TrainData::input_target_train_data_path, onert_micro::MAE_METRICS, training_configure_tool::TrainData::metrics_to_check_best_config, MODEL_TYPE, onert_micro::MSE_METRICS, onert_micro::NONE, training_configure_tool::TrainData::num_test_data_samples, training_configure_tool::TrainData::num_train_data_samples, onert_micro::Ok, training_configure_tool::TrainResult::peak_memory_footprint, readDataFromFile(), readFile(), onert_micro::OMTrainingInterpreter::reset(), onert_micro::OMTrainingInterpreter::setInput(), onert_micro::OMTrainingInterpreter::setTarget(), onert_micro::OMTrainingInterpreter::trainSingleStep(), onert_micro::UnsupportedType, and training_configure_tool::TrainData::wof_file_path.
Referenced by findBestSparseBackpropagationTensorsRanks(), findBestTrainableOpIndexes(), and selectOpIndexesSetsAccordingToMemoryRestriction().
std::vector< std::unordered_set< uint16_t > > training_configure_tool::selectOpIndexesSetsAccordingToMemoryRestriction | ( | const std::vector< std::unordered_set< uint16_t > > & | op_indexes_sets, |
onert_micro::OMConfig | config, | ||
training_configure_tool::TrainData | train_data | ||
) |
Definition at line 198 of file SparseBackpropagationHelper.cpp.
References createResultData(), training_configure_tool::TrainData::memory_above_restriction, training_configure_tool::TrainData::metrics_to_check_best_config, onert_micro::NONE, training_configure_tool::TrainData::num_test_data_samples, training_configure_tool::TrainData::num_train_data_samples, training_configure_tool::TrainResult::peak_memory_footprint, and runTrainProcessWithCurConfig().
Referenced by findBestTrainableOpIndexes().
void training_configure_tool::writeDataToFile | ( | const std::string & | filename, |
const char * | data, | ||
size_t | data_size | ||
) |
Definition at line 92 of file TrainingConfigureFileHandler.cpp.