#include "env.h"
-#include "util/environment.h"
+#include "misc/environment.h"
//
// Integer variable
//
IntVar::IntVar(const std::string &name, int32_t value) : _value{value}
{
- nnfw::util::env::IntAccessor{name}.access(_value);
+ nnfw::misc::env::IntAccessor{name}.access(_value);
}
//
//
FloatVar::FloatVar(const std::string &name, float value) : _value{value}
{
- nnfw::util::env::FloatAccessor{name}.access(_value);
+ nnfw::misc::env::FloatAccessor{name}.access(_value);
}
//
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_add_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "add_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_add_2, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "add_2.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/TensorShapeUtils.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_add_3, simple_test)
{
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Initialize random number generator
std::minstd_rand random(SEED);
#include "add_3.lst"
#undef STR_VALUE
- const auto LHS_SHAPE = nnfw::util::tensor::Shape::from(LHS_SHAPE_Value());
- const auto RHS_SHAPE = nnfw::util::tensor::Shape::from(RHS_SHAPE_Value());
- const auto OUT_SHAPE = nnfw::support::tflite::broadcast(LHS_SHAPE, RHS_SHAPE);
+ const auto LHS_SHAPE = nnfw::misc::tensor::Shape::from(LHS_SHAPE_Value());
+ const auto RHS_SHAPE = nnfw::misc::tensor::Shape::from(RHS_SHAPE_Value());
+ const auto OUT_SHAPE = nnfw::tflite::broadcast(LHS_SHAPE, RHS_SHAPE);
std::cout << "Configurations:" << std::endl;
#define PRINT_NEWLINE() \
#undef PRINT_NEWLINE
auto setup = [&](Interpreter &interp) {
- using nnfw::support::tflite::as_dims;
+ using nnfw::tflite::as_dims;
// Comment from 'context.h'
//
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
param.verbose = 0;
param.tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(param.verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(param.tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(param.verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(param.tolerance);
int res = RandomTestRunner{SEED, param}.run(builder);
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_add_4, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "add_4.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_add_5, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "add_5.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_add_6, simple_test)
{
int verbose = 1;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "add_6.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_add_7, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "add_7.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_add_8, simple_test)
{
int verbose = 1;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "add_8.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_add_9, simple_test)
{
int verbose = 1;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "add_9.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_add_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "add_quan_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <iostream>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_avg_pool_1, simple_test)
{
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Set random test parameters
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "avg_pool_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <iostream>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_avg_pool_1, simple_test)
{
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Set random test parameters
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "avg_pool_quan_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/interp/FunctionBuilder.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_cast_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "cast_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_cast_2, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "cast_2.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/interp/FunctionBuilder.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_cast_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "cast_q_to_f_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_concat_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "concat_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_concat_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "concat_quan_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_conv_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "conv_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_conv_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "conv_quan_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_dconv_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "dconv_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_dconv_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "dconv_quan_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/interp/FunctionBuilder.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_dequantize_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "dequantize_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_div_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "div_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_div_2, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "div_2.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
template <typename T> T *make_malloc(void) { return reinterpret_cast<T *>(malloc(sizeof(T))); }
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "conv_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
template <typename T> T *make_malloc(void) { return reinterpret_cast<T *>(malloc(sizeof(T))); }
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "fully_connected_quan_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/interp/FunctionBuilder.h"
#include <iostream>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_gather_1, simple_test)
{
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Set random test parameters
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "gather_1.lst"
interp.SetOutputs({2});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/interp/FunctionBuilder.h"
#include <iostream>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_gather_2, simple_test)
{
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Set random test parameters
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "gather_2.lst"
interp.SetOutputs({2});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_logistic_quan_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "logistic_quan_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <iostream>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_max_pool_1, simple_test)
{
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Set random test parameters
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "max_pool_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <iostream>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_max_pool_1, simple_test)
{
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Set random test parameters
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "max_pool_quan_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/interp/FunctionBuilder.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_mul_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "mul_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/interp/FunctionBuilder.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_mul_2, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "mul_2.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/interp/FunctionBuilder.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_mul_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "mul_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
* limitations under the License.
*/
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
-#include "util/feature/Shape.h"
+#include "misc/environment.h"
+#include "misc/feature/Shape.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <cassert>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
int main(int argc, char **argv)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "relu1_1.lst"
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Initialize random number generator
std::minstd_rand random(SEED);
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
-#include "util/feature/Shape.h"
+#include "misc/environment.h"
+#include "misc/feature/Shape.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <cassert>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_relu6_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "relu6_1.lst"
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Initialize random number generator
std::minstd_rand random(SEED);
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
* limitations under the License.
*/
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
-#include "util/feature/Shape.h"
+#include "misc/environment.h"
+#include "misc/feature/Shape.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <cassert>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
int main(int argc, char **argv)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "relu6_quan_1.lst"
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Initialize random number generator
std::minstd_rand random(SEED);
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
-#include "util/feature/Shape.h"
+#include "misc/environment.h"
+#include "misc/feature/Shape.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <cassert>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_relu_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "relu_1.lst"
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Initialize random number generator
std::minstd_rand random(SEED);
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
-#include "util/feature/Shape.h"
+#include "misc/environment.h"
+#include "misc/feature/Shape.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <cassert>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_relu_2, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "relu_2.lst"
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Initialize random number generator
std::minstd_rand random(SEED);
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
-#include "util/feature/Shape.h"
+#include "misc/environment.h"
+#include "misc/feature/Shape.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <cassert>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_relu_3, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "relu_3.lst"
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Initialize random number generator
std::minstd_rand random(SEED);
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
* limitations under the License.
*/
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
-#include "util/feature/Shape.h"
+#include "misc/environment.h"
+#include "misc/feature/Shape.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <cassert>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
int main(int argc, char **argv)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "relu_quan_1.lst"
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Initialize random number generator
std::minstd_rand random(SEED);
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <iostream>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_reshape_1, simple_test)
{
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Set random test parameters
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "max_pool_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <iostream>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_reshape_1, simple_test)
{
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Set random test parameters
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "reshape_quan_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <iostream>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_resize_bilinear_1, simple_test)
{
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Set random test parameters
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "resize_bilinear_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
-#include "util/feature/Shape.h"
+#include "misc/environment.h"
+#include "misc/feature/Shape.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <cassert>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_softmax_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "softmax_1.lst"
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Initialize random number generator
std::minstd_rand random(SEED);
- const nnfw::util::feature::Shape ifm_shape{IFM_C, IFM_H, IFM_W};
+ const nnfw::misc::feature::Shape ifm_shape{IFM_C, IFM_H, IFM_W};
const int32_t OFM_C = IFM_C;
const int32_t OFM_H = IFM_H;
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
-#include "util/feature/Shape.h"
+#include "misc/environment.h"
+#include "misc/feature/Shape.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <cassert>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_softmax_2, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define FLOAT_VALUE(NAME, VALUE) FloatVar NAME##_Value(#NAME, VALUE);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Initialize random number generator
std::minstd_rand random(SEED);
- const nnfw::util::feature::Shape ifm_shape{IFM_C, IFM_H, IFM_W};
+ const nnfw::misc::feature::Shape ifm_shape{IFM_C, IFM_H, IFM_W};
const int32_t OFM_C = IFM_C;
const int32_t OFM_H = IFM_H;
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
-#include "util/feature/Shape.h"
+#include "misc/environment.h"
+#include "misc/feature/Shape.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <cassert>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_softmax_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "softmax_quan_1.lst"
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Initialize random number generator
std::minstd_rand random(SEED);
- const nnfw::util::feature::Shape ifm_shape{IFM_C, IFM_H, IFM_W};
+ const nnfw::misc::feature::Shape ifm_shape{IFM_C, IFM_H, IFM_W};
const int32_t OFM_C = IFM_C;
const int32_t OFM_H = IFM_H;
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
-#include "util/feature/Shape.h"
+#include "misc/environment.h"
+#include "misc/feature/Shape.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <cassert>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_split_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "split_1.lst"
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Initialize random number generator
std::minstd_rand random(SEED);
interp.SetOutputs(ofm_indexes);
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
-#include "util/feature/Shape.h"
+#include "misc/environment.h"
+#include "misc/feature/Shape.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <cassert>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_split_2, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "split_2.lst"
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Initialize random number generator
std::minstd_rand random(SEED);
interp.SetOutputs(ofm_indexes);
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
-#include "util/feature/Shape.h"
+#include "misc/environment.h"
+#include "misc/feature/Shape.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <cassert>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_split_3, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "split_3.lst"
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Initialize random number generator
std::minstd_rand random(SEED);
interp.SetOutputs(ofm_indexes);
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
-#include "util/feature/Shape.h"
+#include "misc/environment.h"
+#include "misc/feature/Shape.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <cassert>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_split_4, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "split_4.lst"
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Initialize random number generator
std::minstd_rand random(SEED);
interp.SetOutputs(ofm_indexes);
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_sub_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "sub_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_sub_2, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "sub_2.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_sub_3, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "sub_3.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_sub_4, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "sub_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_sub_5, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "sub_5.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_sub_6, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "sub_6.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <random>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_tanh_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "tanh_1.lst"
interp.SetOutputs({0});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;
#include "gtest/gtest.h"
-#include "tflite/kernels/register.h"
+#include "tflite/ext/kernels/register.h"
#include "tensorflow/contrib/lite/model.h"
#include "tensorflow/contrib/lite/builtin_op_data.h"
#include "env.h"
#include "memory.h"
-#include "util/environment.h"
+#include "misc/environment.h"
#include "tflite/Diff.h"
#include "tflite/Quantization.h"
#include <iostream>
using namespace tflite;
-using namespace tflite::ops::builtin;
+using namespace nnfw::tflite;
TEST(NNAPI_Quickcheck_topk_v2_1, simple_test)
{
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
- nnfw::util::env::IntAccessor("SEED").access(SEED);
+ nnfw::misc::env::IntAccessor("SEED").access(SEED);
// Set random test parameters
int verbose = 0;
int tolerance = 1;
- nnfw::util::env::IntAccessor("VERBOSE").access(verbose);
- nnfw::util::env::IntAccessor("TOLERANCE").access(tolerance);
+ nnfw::misc::env::IntAccessor("VERBOSE").access(verbose);
+ nnfw::misc::env::IntAccessor("TOLERANCE").access(tolerance);
#define INT_VALUE(NAME, VALUE) IntVar NAME##_Value(#NAME, VALUE);
#include "topk_v2_1.lst"
interp.SetOutputs({2, 3});
};
- const nnfw::support::tflite::interp::FunctionBuilder builder(setup);
+ const nnfw::tflite::FunctionBuilder builder(setup);
RandomTestParam param;