diff --git a/dnnlibrary/include/ModelBuilder.h b/dnnlibrary/include/ModelBuilder.h index b4ddec5..d6b347e 100644 --- a/dnnlibrary/include/ModelBuilder.h +++ b/dnnlibrary/include/ModelBuilder.h @@ -43,10 +43,10 @@ class ModelBuilder { std::map float32_operand_map_; std::map float32_as_tensor_operand_map_; StrKeyMap operand_types_; - // tensor_inputs_ and tensor_outputs_ is to automatically determine the + // imm_blob_inputs_ and imm_blob_outputs_ is to automatically determine the // output of the model - std::set tensor_inputs_; - std::set tensor_outputs_; + std::set imm_blob_inputs_; + std::set imm_blob_outputs_; uint32_t int32_missing_index = UINT32_MAX; uint32_t float32_missing_index = UINT32_MAX; diff --git a/generate_code.py b/generate_code.py index 2f1fbe7..d6e1fef 100644 --- a/generate_code.py +++ b/generate_code.py @@ -75,7 +75,7 @@ def add_tensor_operand(operand): if operand['predefined'] == 'optional_bias': return add_optional_bias() if operand['cpp_type'] == 'str': - return '''tensor_inputs.insert({0}); + return '''imm_blob_inputs_.insert({0}); const auto {0}_idx = operand_indexes_.at({0}); input_indexes.push_back({0}_idx);'''.format(operand['name']) elif operand['cpp_type'] == 'float': @@ -86,7 +86,7 @@ def add_tensor_operand(operand): input_indexes.push_back({0}_idx);'''.format(operand['name']) elif operand['cpp_type'] == 'str_list': return '''for (const auto &x : {}) {{ -tensor_inputs_.insert(x); +imm_blob_inputs_.insert(x); input_indexes.push_back(operand_indexes_.at(x)); }}'''.format(operand['name']) else: @@ -296,7 +296,7 @@ def generate_model_builder(): 'AddOperation(ANEURALNETWORKS_{}, input_indexes, operand_type)[0];'.format(op['nnapi'])) cogout( '''RegisterOperand(output, output_idx, operand_type); - tensor_outputs_.insert(output); + imm_blob_outputs_.insert(output); return output_idx; } '''