#include <tensorflow/core/framework/graph.pb.h>
-namespace moco
-{
-namespace tf
+namespace
{
-/**
- * @brief GraphBuilder for Mul node
- */
-class MulGraphBuilder final : public GraphBuilder
-{
-public:
- bool validate(const tensorflow::NodeDef &) const override;
- void build(const tensorflow::NodeDef &, GraphBuilderContext *) const override;
-};
+using namespace moco::tf;
/**
* @brief GraphUpdate for TF Mul node
std::vector<TensorName> _names;
};
+void TFMulGraphUpdate::input(const SymbolTable *tensor_names) const
+{
+ int num_inputs = _names.size();
+ assert(num_inputs == 2);
+
+ _node->x(tensor_names->node(_names[0]));
+ _node->y(tensor_names->node(_names[1]));
+}
+
+} // namespace
+
+namespace moco
+{
+namespace tf
+{
+
+/**
+ * @brief GraphBuilder for Mul node
+ */
+class MulGraphBuilder final : public GraphBuilder
+{
+public:
+ bool validate(const tensorflow::NodeDef &) const override;
+ void build(const tensorflow::NodeDef &, GraphBuilderContext *) const override;
+};
+
bool MulGraphBuilder::validate(const tensorflow::NodeDef &node) const
{
assert(node.input_size() == 2);
updates->enroll(std::move(tf_mul_update));
}
-void TFMulGraphUpdate::input(const SymbolTable *tensor_names) const
-{
- int num_inputs = _names.size();
- assert(num_inputs == 2);
-
- _node->x(tensor_names->node(_names[0]));
- _node->y(tensor_names->node(_names[1]));
-}
-
} // namespace tf
} // namespace moco