sync code clean to master

This commit is contained in:
mengyuanli 2022-01-26 09:40:50 +08:00
parent fd6f49ad7f
commit 2857183da5
2 changed files with 3 additions and 3 deletions

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; }

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(),