Skip to content

Commit

Permalink
expression层中的output数据空间为空的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zjhellofss committed Sep 1, 2023
1 parent bdf8d32 commit 132d598
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 0 additions & 3 deletions source/layer/abstract/layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ StatusCode Layer::Forward() {

const std::shared_ptr<RuntimeOperand>& output_operand_datas =
runtime_operator->output_operands;
if (output_operand_datas == nullptr || output_operand_datas->datas.empty()) {
int a = 3;
}
CHECK(!layer_input_datas.empty())
<< runtime_operator->name << " Layer input data is empty";
CHECK(output_operand_datas != nullptr && !output_operand_datas->datas.empty())
Expand Down
5 changes: 3 additions & 2 deletions source/layer/details/expression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ StatusCode ExpressionLayer::Forward(
std::vector<sftensor> output_node = op_stack.top();
op_stack.pop();
for (int i = 0; i < batch_size; ++i) {
CHECK(outputs.at(i) != nullptr && !outputs.at(i)->empty());
CHECK(outputs.at(i)->shapes() == output_node.at(i)->shapes());
if (outputs.at(i) != nullptr && !outputs.at(i)->empty()) {
CHECK(outputs.at(i)->shapes() == output_node.at(i)->shapes());
}
outputs.at(i) = output_node.at(i);
}
return StatusCode::kSuccess;
Expand Down

0 comments on commit 132d598

Please sign in to comment.