// TODO TFLAveragePool2D
-// TODO TFLConcatenation
+TEST(TFLConcatTest, constructor)
+{
+ locoex::TFLConcatenation concat_node(3);
+
+ ASSERT_EQ(concat_node.dialect(), locoex::TFLDialect::get());
+ ASSERT_EQ(concat_node.opcode(), locoex::TFLOpcode::CONCATENATION);
+
+ ASSERT_EQ(concat_node.numValues(), 3);
+ ASSERT_EQ(concat_node.values(0), nullptr);
+ ASSERT_EQ(concat_node.values(1), nullptr);
+ ASSERT_EQ(concat_node.values(2), nullptr);
+ ASSERT_EQ(concat_node.fusedActivationFunction(), locoex::FusedActFunc::UNDEFINED);
+}
// TODO TFLConv2D
// TODO TFLAveragePool2D
-// TODO TFLConcatenation
+TEST_F(TFLExporterImplTests, Concatenate)
+{
+ auto pull1 = make_node<loco::Pull>();
+ {
+ pull1->dtype(loco::DataType::FLOAT32);
+ pull1->shape({1, 2, 3, 4});
+ }
+ auto pull2 = make_node<loco::Pull>();
+ {
+ pull2->dtype(loco::DataType::FLOAT32);
+ pull2->shape({1, 2, 3, 4});
+ }
+ auto concat = make_node<loco::TensorConcat>();
+ {
+ concat->lhs(pull1);
+ concat->rhs(pull2);
+ }
+ auto push = make_node<loco::Push>();
+ {
+ push->from(concat);
+ }
+
+ auto input1 = graph()->inputs()->create();
+ {
+ input1->name("input1");
+ loco::link(input1, pull1);
+ }
+ auto input2 = graph()->inputs()->create();
+ {
+ input2->name("input2");
+ loco::link(input2, pull2);
+ }
+ auto output = graph()->outputs()->create();
+ {
+ output->name("output");
+ loco::link(output, push);
+ }
+
+ exo::TFLExporter::Impl exporter{graph()};
+
+ // TODO Add more checks
+ SUCCEED();
+}
// TODO TFLConv2D