Skip to content

Commit

Permalink
修改获取参数的方法
Browse files Browse the repository at this point in the history
  • Loading branch information
zjhellofss committed Apr 21, 2024
1 parent fb715cf commit 3bb5a7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/layer/details/flatten.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ StatusCode FlattenLayer::CreateInstance(const std::shared_ptr<RuntimeOperator>&
return StatusCode::kParseParameterError;
}

if (params.find("end_dim") == params.end()) {
if (!op->has_parameter("end_dim")) {
LOG(ERROR) << "Can not find the dimension parameter";
return StatusCode::kParseParameterError;
}

if (params.find("start_dim") == params.end()) {
if (!op->has_parameter("start_dim")) {
LOG(ERROR) << "Can not find the dimension parameter";
return StatusCode::kParseParameterError;
}
Expand Down

0 comments on commit 3bb5a7b

Please sign in to comment.