Browse Source

!29538 [MS][LITE]clean code

Merge pull request !29538 from mengyuanli/get_in_open_harmony
feature/build-system-rewrite
i-robot Gitee 4 years ago
parent
commit
6b8908c36d
No known key found for this signature in database GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      mindspore/lite/src/inner_kernel.h
  2. +2
    -2
      mindspore/lite/src/lite_model.cc

+ 1
- 1
mindspore/lite/src/inner_kernel.h View File

@@ -167,7 +167,7 @@ class InnerKernel : public Kernel {

virtual bool IsTrainable() const { return this->trainable_; }

TypeId registry_data_type(void) { return registry_data_type_; }
TypeId registry_data_type(void) const { return registry_data_type_; }

void set_registry_data_type(TypeId data_type) { registry_data_type_ = data_type; }



+ 2
- 2
mindspore/lite/src/lite_model.cc View File

@@ -233,7 +233,7 @@ int LiteModel::NodeVerify() const {
MS_LOG(ERROR) << "Index of node->output_indices_ is beyond size.";
return RET_ERROR;
}
if (std::any_of(node->output_indices_.begin(), node->output_indices_.end(), [&](const uint32_t &idx) {
if (std::any_of(node->output_indices_.begin(), node->output_indices_.end(), [&, this](const uint32_t &idx) {
return this->all_tensors_[idx]->nodeType() == NodeType_ValueNode &&
this->all_tensors_[idx]->data() != nullptr;
})) {
@@ -312,7 +312,7 @@ int LiteModel::SubGraphVerify() const {
}

int LiteModel::SubGraphInOutVerify(const Model::SubGraph *graph) const {
auto from_node = [&](uint32_t cur_idx) -> bool {
auto from_node = [&, this](uint32_t cur_idx) -> bool {
for (auto node_idx : graph->node_indices_) {
auto node = this->all_nodes_.at(node_idx);
if (std::any_of(node->output_indices_.begin(), node->output_indices_.end(),


Loading…
Cancel
Save