std::array<std::unique_ptr<loco::Use>, N> _args;
};
+// TODO TFLAdd
+
+// TODO TFLAveragePool2D
+
+// TODO TFLConcatenation
+
+// TODO TFLConv2D
+
+// TODO TFLDepthwiseConv2D
+
+// TODO TFLDiv
+
+// TODO TFLMaxPool2D
+
+// TODO TFLMul
+
class TFLRelu final : public FixedArityNode<1, TFLNodeImpl<TFLOpcode::RELU>>
{
public:
void input(loco::Node *node) { at(0)->node(node); }
};
+// TODO TFLRelu6
+
+// TODO TFLReshape
+
+// TODO TFLSoftmax
+
+// TODO TFLSqrt
+
+// TODO TFLSub
+
+// TODO TFLTanh
+
+// TODO TFLTranspose
+
// TODO define more children of TFLNode
} // namespace locoex
// PLEASE SORT NODE DECLS IN ALPHABETICAL ORDER
//
// TODO TFLAdd
-// TODO TFLAvgPool2D
-// TODO TFLConcat
+// TODO TFLAveragePool2D
+// TODO TFLConcatenation
// TODO TFLConv2D
// TODO TFLDepthwiseConv2D
// TODO TFLDiv
#include <gtest/gtest.h>
+// TODO TFLAdd
+
+// TODO TFLAveragePool2D
+
+// TODO TFLConcatenation
+
+// TODO TFLConv2D
+
+// TODO TFLDepthwiseConv2D
+
+// TODO TFLDiv
+
+// TODO TFLMaxPool2D
+
+// TODO TFLMul
+
TEST(TFLReluTest, constructor)
{
locoex::TFLRelu relu_node;
ASSERT_EQ(relu_node.input(), nullptr);
}
+
+// TODO TFLRelu6
+
+// TODO TFLReshape
+
+// TODO TFLSoftmax
+
+// TODO TFLSqrt
+
+// TODO TFLSub
+
+// TODO TFLTanh
+
+// TODO TFLTranspose
KNOB_BOOL(EnableTFLDialect, false, Convert canonical nodes to TFLNodes)
// operations
+// TODO TFLAdd
+// TODO TFLAveragePool2D
+// TODO TFLConcatenation
+// TODO TFLConv2D
+// TODO TFLDepthwiseConv2D
+// TODO TFLDiv
+// TODO TFLMaxPool2D
+// TODO TFLMul
KNOB_BOOL(ConvertRelu, false, Convert loco::Relu to TFLRelu)
+// TODO TFLRelu6
+// TODO TFLReshape
+// TODO TFLSoftmax
+// TODO TFLSqrt
+// TODO TFLSub
+// TODO TFLTanh
+// TODO TFLTranspose
public:
// FOR TFLNodes
+ // TODO TFLAdd
+ // TODO TFLAveragePool2D
+ // TODO TFLConcatenation
+ // TODO TFLConv2D
+ // TODO TFLDepthwiseConv2D
+ // TODO TFLDiv
+ // TODO TFLMaxPool2D
+ // TODO TFLMul
void visit(locoex::TFLRelu *) final;
+ // TODO TFLRelu6
+ // TODO TFLReshape
+ // TODO TFLSoftmax
+ // TODO TFLSqrt
+ // TODO TFLSub
+ // TODO TFLTanh
+ // TODO TFLTranspose
// FOR canonical nodes. These will be removed later
void visit(loco::ReLU *) final;
SerializedModelData &gd;
};
+// TODO TFLAdd
+
+// TODO TFLAveragePool2D
+
+// TODO TFLConcatenation
+
+// TODO TFLConv2D
+
+// TODO TFLDepthwiseConv2D
+
+// TODO TFLDiv
+
+// TODO TFLMaxPool2D
+
+// TODO TFLMul
+
void OperationExporter::visit(locoex::TFLRelu *node)
{
uint32_t op_idx = gd.registerBuiltinOpcode(tflite::BuiltinOperator_RELU);
gd._operators.push_back(op_offset);
}
+// TODO TFLRelu6
+
+// TODO TFLReshape
+
+// TODO TFLSoftmax
+
+// TODO TFLSqrt
+
+// TODO TFLSub
+
+// TODO TFLTanh
+
+// TODO TFLTranspose
+
void OperationExporter::visit(loco::ReLU *node)
{
uint32_t op_idx = gd.registerBuiltinOpcode(tflite::BuiltinOperator_RELU);
} // namespace
+// TODO TFLAdd
+
+// TODO TFLAveragePool2D
+
+// TODO TFLConcatenation
+
+// TODO TFLConv2D
+
+// TODO TFLDepthwiseConv2D
+
+// TODO TFLDiv
+
+// TODO TFLMaxPool2D
+
+// TODO TFLMul
+
TEST_F(TFLExporterImplTests, Relu6)
{
auto pull = make_node<loco::Pull>();
SUCCEED();
}
+// TODO TFLRelu6
+
+// TODO TFLReshape
+
+// TODO TFLSoftmax
+
+// TODO TFLSqrt
+
+// TODO TFLSub
+
+// TODO TFLTanh
+
+// TODO TFLTranspose
+
/**
* What happens when there is a mismatch between generation and execution order!?
*/
return false;
}
+// TODO TFLAdd
+
+// TODO TFLAveragePool2D
+
+// TODO TFLConcatenation
+
+// TODO TFLConv2D
+
+// TODO TFLDepthwiseConv2D
+
+// TODO TFLDiv
+
+// TODO TFLMaxPool2D
+
+// TODO TFLMul
+
bool TFLNodeSummaryBuilder::summary(const locoex::TFLRelu *node, locop::NodeSummary &s) const
{
s.opname("TFL.RELU");
return true;
}
+// TODO TFLRelu6
+
+// TODO TFLReshape
+
+// TODO TFLSoftmax
+
+// TODO TFLSqrt
+
+// TODO TFLSub
+
+// TODO TFLTanh
+
+// TODO TFLTranspose
+
} // namespace
namespace exo