Browse Source

Optimized ApplyTransform function

tags/v0.5.0-beta
Kang 5 years ago
parent
commit
c621fbda20
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      mindspore/ccsrc/optimizer/opt.cc

+ 1
- 0
mindspore/ccsrc/optimizer/opt.cc View File

@@ -110,6 +110,7 @@ bool SubstitutionList::ApplyTransform(const OptimizerPtr &optimizer, const AnfNo
auto seen = NewSeenGeneration();
// 1024 is for the initial capacity of deque
std::deque<AnfNodePtr> todo(1024);
todo.clear();
todo.push_back(root_node);
bool changes = false;



Loading…
Cancel
Save