Skip to content

Commit

Permalink
MNN:Bugfix: Fix bug for alibaba#3058
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaying committed Dec 10, 2024
1 parent 2b899c1 commit cba6e25
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/utils/InitNet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ bool initTensors(std::vector<std::shared_ptr<Tensor>>& tensors, const Net* net,
}
auto blob = des->blob();
auto& tb = tensors[index]->buffer();
if (nullptr == blob) {
continue;
}
if (auto idims = blob->dims()) {
for (int d = 0; d < idims->size(); d++) {
tb.dim[d].extent = idims->Get(d);
Expand Down

0 comments on commit cba6e25

Please sign in to comment.