12 Optimizer::Optimizer()
23 bool graphNeedsSorting =
false;
30 for (
auto&& optimization : optimizations)
37 optimization->Run(graph, **it);
39 if ((*it)->IsOutputUnconnected())
44 graphNeedsSorting =
true;
48 for (
auto& erasedLayerName : erasedLayerNamesObservable)
50 for (
auto& addedLayer : addedLayerObservable)
52 addedLayer->AddRelatedLayerName(erasedLayerName);
56 erasedLayerNamesObservable.Clear();
57 addedLayerObservable.
Clear();
59 if (graphNeedsSorting)
61 graphNeedsSorting =
false;