12 Optimizer::Optimizer()
23 bool graphNeedsSorting =
false;
30 for (
auto&& optimization : optimizations)
33 optimization->Run(graph, **it);
35 if ((*it)->IsOutputUnconnected())
40 graphNeedsSorting =
true;
44 for (
auto& erasedLayerName : erasedLayerNamesObservable)
46 for (
auto& addedLayer : addedLayerObservable)
48 addedLayer->AddRelatedLayerName(erasedLayerName);
52 erasedLayerNamesObservable.Clear();
53 addedLayerObservable.
Clear();
55 if (graphNeedsSorting)
57 graphNeedsSorting =
false;