Class to insert scale/shift virtual Ops to loco::Graph.
More...
#include <InsertScaleShift.h>
Class to insert scale/shift virtual Ops to loco::Graph.
Definition at line 30 of file InsertScaleShift.h.
◆ InsertScaleShift()
| fme_apply::InsertScaleShift::InsertScaleShift |
( |
std::vector< EqualizePattern > & |
patterns | ) |
|
|
inline |
◆ run()
| void fme_apply::InsertScaleShift::run |
( |
loco::Graph * |
graph | ) |
|
Definition at line 338 of file InsertScaleShift.cpp.
339{
340
341
342
343 std::map<std::string, EqualizePattern *> pattern_by_back;
344 {
345 for (auto &pattern : _patterns)
346 {
347 auto back = pattern.back;
348 pattern_by_back[back] = &pattern;
349 }
350 }
351
353 {
355
356 if (pattern_by_back.find(cnode->name()) == pattern_by_back.end())
357 continue;
358
359 auto pattern = pattern_by_back.at(cnode->name());
360 InsertScaleShiftVisitor issv(pattern);
361 cnode->accept(&issv);
362 }
363}
std::vector< loco::Node * > postorder_traversal(const std::vector< loco::Node * > &roots)
Generate postorder traversal sequence starting from "roots".
T must_cast(FeatureEncoder *node)
A helper dynamic_cast that throws when failed.
std::vector< Node * > output_nodes(Graph *)
References loco::must_cast(), loco::output_nodes(), and loco::postorder_traversal().
Referenced by fme_apply::FMEqualizer::equalize().
The documentation for this class was generated from the following files: