#include <cassert>
#include <stdexcept>
-namespace moco
-{
-namespace tf
+namespace
{
-/**
- * @brief GraphBuilder for Relu node
- */
-class ReluGraphBuilder final : public ReluGraphBuilderBase
-{
-public:
- void build(const tensorflow::NodeDef &, GraphBuilderContext *) const override;
-};
+using namespace moco::tf;
class ReLUGraphUpdate final : public GraphUpdate
{
const TensorName _name;
};
+void ReLUGraphUpdate::input(const SymbolTable *table) const
+{
+ loco::Node *target = table->node(_name);
+ _node->input(target);
+}
+
+void TFReluGraphUpdate::input(const SymbolTable *table) const
+{
+ loco::Node *target = table->node(_name);
+ _node->features(target);
+}
+
+} // namespace
+
+namespace moco
+{
+namespace tf
+{
+
+/**
+ * @brief GraphBuilder for Relu node
+ */
+class ReluGraphBuilder final : public ReluGraphBuilderBase
+{
+public:
+ void build(const tensorflow::NodeDef &, GraphBuilderContext *) const override;
+};
+
bool ReluGraphBuilderBase::validate(const tensorflow::NodeDef &node) const
{
// ReLU node SHOULD have only one input
updates->enroll(std::move(update));
}
-void ReLUGraphUpdate::input(const SymbolTable *table) const
-{
- loco::Node *target = table->node(_name);
- _node->input(target);
-}
-
-void TFReluGraphUpdate::input(const SymbolTable *table) const
-{
- loco::Node *target = table->node(_name);
- _node->features(target);
-}
-
} // namespace tf
} // namespace moco