2017-06-26 18:35:51 +08:00
|
|
|
// This file is part of OpenCV project.
|
|
|
|
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
|
|
|
// of this distribution and at http://opencv.org/license.html.
|
|
|
|
|
2017-08-25 19:45:03 +08:00
|
|
|
// Copyright (C) 2017, Intel Corporation, all rights reserved.
|
2017-06-26 18:35:51 +08:00
|
|
|
// Third party copyrights are property of their respective owners.
|
|
|
|
|
|
|
|
/*
|
|
|
|
Test for Tensorflow models loading
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "test_precomp.hpp"
|
|
|
|
#include "npy_blob.hpp"
|
2017-12-19 16:59:46 +08:00
|
|
|
#include <opencv2/core/ocl.hpp>
|
|
|
|
#include <opencv2/ts/ocl_test.hpp>
|
2017-06-26 18:35:51 +08:00
|
|
|
|
2017-11-05 21:48:40 +08:00
|
|
|
namespace opencv_test
|
2017-06-26 18:35:51 +08:00
|
|
|
{
|
|
|
|
|
|
|
|
using namespace cv;
|
|
|
|
using namespace cv::dnn;
|
|
|
|
|
|
|
|
template<typename TString>
|
|
|
|
static std::string _tf(TString filename)
|
|
|
|
{
|
|
|
|
return (getOpenCVExtraDir() + "/dnn/") + filename;
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(Test_TensorFlow, read_inception)
|
|
|
|
{
|
|
|
|
Net net;
|
|
|
|
{
|
|
|
|
const string model = findDataFile("dnn/tensorflow_inception_graph.pb", false);
|
2017-08-03 22:43:52 +08:00
|
|
|
net = readNetFromTensorflow(model);
|
|
|
|
ASSERT_FALSE(net.empty());
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
Mat sample = imread(_tf("grace_hopper_227.png"));
|
|
|
|
ASSERT_TRUE(!sample.empty());
|
|
|
|
Mat input;
|
|
|
|
resize(sample, input, Size(224, 224));
|
|
|
|
input -= 128; // mean sub
|
|
|
|
|
|
|
|
Mat inputBlob = blobFromImage(input);
|
|
|
|
|
|
|
|
net.setInput(inputBlob, "input");
|
|
|
|
Mat out = net.forward("softmax2");
|
|
|
|
|
|
|
|
std::cout << out.dims << std::endl;
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(Test_TensorFlow, inception_accuracy)
|
|
|
|
{
|
|
|
|
Net net;
|
|
|
|
{
|
|
|
|
const string model = findDataFile("dnn/tensorflow_inception_graph.pb", false);
|
2017-08-03 22:43:52 +08:00
|
|
|
net = readNetFromTensorflow(model);
|
|
|
|
ASSERT_FALSE(net.empty());
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
Mat sample = imread(_tf("grace_hopper_227.png"));
|
|
|
|
ASSERT_TRUE(!sample.empty());
|
|
|
|
resize(sample, sample, Size(224, 224));
|
|
|
|
Mat inputBlob = blobFromImage(sample);
|
|
|
|
|
|
|
|
net.setInput(inputBlob, "input");
|
|
|
|
Mat out = net.forward("softmax2");
|
|
|
|
|
|
|
|
Mat ref = blobFromNPY(_tf("tf_inception_prob.npy"));
|
|
|
|
|
|
|
|
normAssert(ref, out);
|
|
|
|
}
|
|
|
|
|
2017-08-01 23:21:47 +08:00
|
|
|
static std::string path(const std::string& file)
|
|
|
|
{
|
|
|
|
return findDataFile("dnn/tensorflow/" + file, false);
|
|
|
|
}
|
|
|
|
|
2018-01-04 02:21:04 +08:00
|
|
|
static void runTensorFlowNet(const std::string& prefix, int targetId = DNN_TARGET_CPU, bool hasText = false,
|
2017-10-28 00:01:41 +08:00
|
|
|
double l1 = 1e-5, double lInf = 1e-4,
|
|
|
|
bool memoryLoad = false)
|
2017-08-01 23:21:47 +08:00
|
|
|
{
|
|
|
|
std::string netPath = path(prefix + "_net.pb");
|
2017-09-28 21:51:47 +08:00
|
|
|
std::string netConfig = (hasText ? path(prefix + "_net.pbtxt") : "");
|
2017-08-01 23:21:47 +08:00
|
|
|
std::string inpPath = path(prefix + "_in.npy");
|
|
|
|
std::string outPath = path(prefix + "_out.npy");
|
|
|
|
|
2017-10-28 00:01:41 +08:00
|
|
|
Net net;
|
|
|
|
if (memoryLoad)
|
|
|
|
{
|
|
|
|
// Load files into a memory buffers
|
|
|
|
string dataModel;
|
|
|
|
ASSERT_TRUE(readFileInMemory(netPath, dataModel));
|
|
|
|
|
|
|
|
string dataConfig;
|
|
|
|
if (hasText)
|
|
|
|
ASSERT_TRUE(readFileInMemory(netConfig, dataConfig));
|
|
|
|
|
|
|
|
net = readNetFromTensorflow(dataModel.c_str(), dataModel.size(),
|
|
|
|
dataConfig.c_str(), dataConfig.size());
|
|
|
|
}
|
|
|
|
else
|
|
|
|
net = readNetFromTensorflow(netPath, netConfig);
|
|
|
|
|
|
|
|
ASSERT_FALSE(net.empty());
|
2017-08-01 23:21:47 +08:00
|
|
|
|
2018-01-04 02:21:04 +08:00
|
|
|
net.setPreferableBackend(DNN_BACKEND_DEFAULT);
|
|
|
|
net.setPreferableTarget(targetId);
|
|
|
|
|
2017-08-01 23:21:47 +08:00
|
|
|
cv::Mat input = blobFromNPY(inpPath);
|
|
|
|
cv::Mat target = blobFromNPY(outPath);
|
|
|
|
|
|
|
|
net.setInput(input);
|
|
|
|
cv::Mat output = net.forward();
|
2017-09-07 15:18:13 +08:00
|
|
|
normAssert(target, output, "", l1, lInf);
|
2017-08-01 23:21:47 +08:00
|
|
|
}
|
|
|
|
|
2017-09-14 03:18:02 +08:00
|
|
|
TEST(Test_TensorFlow, conv)
|
2017-08-01 23:21:47 +08:00
|
|
|
{
|
|
|
|
runTensorFlowNet("single_conv");
|
2017-09-12 20:56:51 +08:00
|
|
|
runTensorFlowNet("atrous_conv2d_valid");
|
|
|
|
runTensorFlowNet("atrous_conv2d_same");
|
2017-09-14 03:18:02 +08:00
|
|
|
runTensorFlowNet("depthwise_conv2d");
|
2017-08-01 23:21:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
TEST(Test_TensorFlow, padding)
|
|
|
|
{
|
|
|
|
runTensorFlowNet("padding_same");
|
|
|
|
runTensorFlowNet("padding_valid");
|
2017-09-22 17:12:03 +08:00
|
|
|
runTensorFlowNet("spatial_padding");
|
2017-08-01 23:21:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
TEST(Test_TensorFlow, eltwise_add_mul)
|
|
|
|
{
|
|
|
|
runTensorFlowNet("eltwise_add_mul");
|
|
|
|
}
|
|
|
|
|
2018-01-04 02:21:04 +08:00
|
|
|
OCL_TEST(Test_TensorFlow, eltwise_add_mul)
|
|
|
|
{
|
|
|
|
runTensorFlowNet("eltwise_add_mul", DNN_TARGET_OPENCL);
|
|
|
|
}
|
|
|
|
|
2017-08-01 23:21:47 +08:00
|
|
|
TEST(Test_TensorFlow, pad_and_concat)
|
|
|
|
{
|
|
|
|
runTensorFlowNet("pad_and_concat");
|
|
|
|
}
|
|
|
|
|
2017-09-14 03:18:02 +08:00
|
|
|
TEST(Test_TensorFlow, batch_norm)
|
2017-08-01 23:21:47 +08:00
|
|
|
{
|
2017-09-14 03:18:02 +08:00
|
|
|
runTensorFlowNet("batch_norm");
|
2017-08-01 23:21:47 +08:00
|
|
|
runTensorFlowNet("fused_batch_norm");
|
2018-01-04 02:21:04 +08:00
|
|
|
runTensorFlowNet("batch_norm_text", DNN_TARGET_CPU, true);
|
2018-02-12 23:55:27 +08:00
|
|
|
runTensorFlowNet("mvn_batch_norm");
|
|
|
|
runTensorFlowNet("mvn_batch_norm_1x1");
|
2017-08-01 23:21:47 +08:00
|
|
|
}
|
|
|
|
|
2018-01-04 23:14:28 +08:00
|
|
|
OCL_TEST(Test_TensorFlow, batch_norm)
|
|
|
|
{
|
|
|
|
runTensorFlowNet("batch_norm", DNN_TARGET_OPENCL);
|
|
|
|
runTensorFlowNet("fused_batch_norm", DNN_TARGET_OPENCL);
|
|
|
|
runTensorFlowNet("batch_norm_text", DNN_TARGET_OPENCL, true);
|
|
|
|
}
|
|
|
|
|
2017-08-01 23:21:47 +08:00
|
|
|
TEST(Test_TensorFlow, pooling)
|
|
|
|
{
|
|
|
|
runTensorFlowNet("max_pool_even");
|
|
|
|
runTensorFlowNet("max_pool_odd_valid");
|
|
|
|
runTensorFlowNet("max_pool_odd_same");
|
2018-01-26 21:45:25 +08:00
|
|
|
runTensorFlowNet("ave_pool_same");
|
2017-08-01 23:21:47 +08:00
|
|
|
}
|
|
|
|
|
2017-08-11 21:23:41 +08:00
|
|
|
TEST(Test_TensorFlow, deconvolution)
|
|
|
|
{
|
|
|
|
runTensorFlowNet("deconvolution");
|
2018-02-12 23:55:27 +08:00
|
|
|
runTensorFlowNet("deconvolution_same");
|
|
|
|
runTensorFlowNet("deconvolution_stride_2_same");
|
|
|
|
runTensorFlowNet("deconvolution_adj_pad_valid");
|
|
|
|
runTensorFlowNet("deconvolution_adj_pad_same");
|
2017-08-11 21:23:41 +08:00
|
|
|
}
|
|
|
|
|
2018-01-16 21:54:32 +08:00
|
|
|
OCL_TEST(Test_TensorFlow, deconvolution)
|
|
|
|
{
|
|
|
|
runTensorFlowNet("deconvolution", DNN_TARGET_OPENCL);
|
|
|
|
}
|
|
|
|
|
2017-09-14 03:18:02 +08:00
|
|
|
TEST(Test_TensorFlow, matmul)
|
|
|
|
{
|
|
|
|
runTensorFlowNet("matmul");
|
2017-12-20 19:13:40 +08:00
|
|
|
runTensorFlowNet("nhwc_reshape_matmul");
|
|
|
|
runTensorFlowNet("nhwc_transpose_reshape_matmul");
|
2017-09-14 03:18:02 +08:00
|
|
|
}
|
|
|
|
|
2017-09-20 18:30:25 +08:00
|
|
|
TEST(Test_TensorFlow, defun)
|
|
|
|
{
|
|
|
|
runTensorFlowNet("defun_dropout");
|
|
|
|
}
|
|
|
|
|
2017-09-18 18:04:43 +08:00
|
|
|
TEST(Test_TensorFlow, reshape)
|
|
|
|
{
|
|
|
|
runTensorFlowNet("shift_reshape_no_reorder");
|
2017-08-25 19:45:03 +08:00
|
|
|
runTensorFlowNet("reshape_reduce");
|
2018-02-18 17:45:43 +08:00
|
|
|
runTensorFlowNet("flatten", DNN_TARGET_CPU, true);
|
2017-09-18 18:04:43 +08:00
|
|
|
}
|
|
|
|
|
2017-09-07 15:18:13 +08:00
|
|
|
TEST(Test_TensorFlow, fp16)
|
|
|
|
{
|
|
|
|
const float l1 = 1e-3;
|
|
|
|
const float lInf = 1e-2;
|
2018-01-04 02:21:04 +08:00
|
|
|
runTensorFlowNet("fp16_single_conv", DNN_TARGET_CPU, false, l1, lInf);
|
|
|
|
runTensorFlowNet("fp16_deconvolution", DNN_TARGET_CPU, false, l1, lInf);
|
|
|
|
runTensorFlowNet("fp16_max_pool_odd_same", DNN_TARGET_CPU, false, l1, lInf);
|
|
|
|
runTensorFlowNet("fp16_padding_valid", DNN_TARGET_CPU, false, l1, lInf);
|
|
|
|
runTensorFlowNet("fp16_eltwise_add_mul", DNN_TARGET_CPU, false, l1, lInf);
|
|
|
|
runTensorFlowNet("fp16_max_pool_odd_valid", DNN_TARGET_CPU, false, l1, lInf);
|
|
|
|
runTensorFlowNet("fp16_pad_and_concat", DNN_TARGET_CPU, false, l1, lInf);
|
|
|
|
runTensorFlowNet("fp16_max_pool_even", DNN_TARGET_CPU, false, l1, lInf);
|
|
|
|
runTensorFlowNet("fp16_padding_same", DNN_TARGET_CPU, false, l1, lInf);
|
2017-09-28 21:51:47 +08:00
|
|
|
}
|
|
|
|
|
2017-12-21 22:15:48 +08:00
|
|
|
TEST(Test_TensorFlow, quantized)
|
|
|
|
{
|
|
|
|
runTensorFlowNet("uint8_single_conv");
|
|
|
|
}
|
|
|
|
|
2017-09-28 21:51:47 +08:00
|
|
|
TEST(Test_TensorFlow, MobileNet_SSD)
|
|
|
|
{
|
|
|
|
std::string netPath = findDataFile("dnn/ssd_mobilenet_v1_coco.pb", false);
|
|
|
|
std::string netConfig = findDataFile("dnn/ssd_mobilenet_v1_coco.pbtxt", false);
|
|
|
|
std::string imgPath = findDataFile("dnn/street.png", false);
|
|
|
|
|
|
|
|
Mat inp;
|
|
|
|
resize(imread(imgPath), inp, Size(300, 300));
|
|
|
|
inp = blobFromImage(inp, 1.0f / 127.5, Size(), Scalar(127.5, 127.5, 127.5), true);
|
|
|
|
|
|
|
|
std::vector<String> outNames(3);
|
|
|
|
outNames[0] = "concat";
|
|
|
|
outNames[1] = "concat_1";
|
|
|
|
outNames[2] = "detection_out";
|
|
|
|
|
|
|
|
std::vector<Mat> target(outNames.size());
|
|
|
|
for (int i = 0; i < outNames.size(); ++i)
|
|
|
|
{
|
|
|
|
std::string path = findDataFile("dnn/tensorflow/ssd_mobilenet_v1_coco." + outNames[i] + ".npy", false);
|
|
|
|
target[i] = blobFromNPY(path);
|
|
|
|
}
|
|
|
|
|
|
|
|
Net net = readNetFromTensorflow(netPath, netConfig);
|
|
|
|
net.setInput(inp);
|
|
|
|
|
|
|
|
std::vector<Mat> output;
|
|
|
|
net.forward(output, outNames);
|
|
|
|
|
|
|
|
normAssert(target[0].reshape(1, 1), output[0].reshape(1, 1));
|
2018-01-21 02:55:25 +08:00
|
|
|
normAssert(target[1].reshape(1, 1), output[1].reshape(1, 1), "", 1e-5, 3e-4);
|
2017-09-28 21:51:47 +08:00
|
|
|
normAssert(target[2].reshape(1, 1), output[2].reshape(1, 1), "", 4e-5, 1e-2);
|
2017-09-07 15:18:13 +08:00
|
|
|
}
|
|
|
|
|
2018-01-26 21:45:25 +08:00
|
|
|
TEST(Test_TensorFlow, Inception_v2_SSD)
|
|
|
|
{
|
|
|
|
std::string proto = findDataFile("dnn/ssd_inception_v2_coco_2017_11_17.pbtxt", false);
|
|
|
|
std::string model = findDataFile("dnn/ssd_inception_v2_coco_2017_11_17.pb", false);
|
|
|
|
|
|
|
|
Net net = readNetFromTensorflow(model, proto);
|
|
|
|
Mat img = imread(findDataFile("dnn/street.png", false));
|
|
|
|
Mat blob = blobFromImage(img, 1.0f / 127.5, Size(300, 300), Scalar(127.5, 127.5, 127.5), true, false);
|
|
|
|
|
|
|
|
net.setInput(blob);
|
|
|
|
// Output has shape 1x1xNx7 where N - number of detections.
|
|
|
|
// An every detection is a vector of values [id, classId, confidence, left, top, right, bottom]
|
|
|
|
Mat out = net.forward();
|
|
|
|
out = out.reshape(1, out.total() / 7);
|
|
|
|
|
|
|
|
Mat detections;
|
|
|
|
for (int i = 0; i < out.rows; ++i)
|
|
|
|
{
|
|
|
|
if (out.at<float>(i, 2) > 0.5)
|
|
|
|
detections.push_back(out.row(i).colRange(1, 7));
|
|
|
|
}
|
|
|
|
|
|
|
|
Mat ref = (Mat_<float>(5, 6) << 1, 0.90176028, 0.19872092, 0.36311883, 0.26461923, 0.63498729,
|
|
|
|
3, 0.93569964, 0.64865261, 0.45906419, 0.80675775, 0.65708131,
|
|
|
|
3, 0.75838411, 0.44668293, 0.45907149, 0.49459291, 0.52197015,
|
|
|
|
10, 0.95932811, 0.38349164, 0.32528657, 0.40387636, 0.39165527,
|
|
|
|
10, 0.93973452, 0.66561931, 0.37841269, 0.68074018, 0.42907384);
|
|
|
|
normAssert(detections, ref);
|
|
|
|
}
|
|
|
|
|
2018-02-12 19:14:41 +08:00
|
|
|
OCL_TEST(Test_TensorFlow, MobileNet_SSD)
|
2017-12-19 16:59:46 +08:00
|
|
|
{
|
|
|
|
std::string netPath = findDataFile("dnn/ssd_mobilenet_v1_coco.pb", false);
|
|
|
|
std::string netConfig = findDataFile("dnn/ssd_mobilenet_v1_coco.pbtxt", false);
|
|
|
|
std::string imgPath = findDataFile("dnn/street.png", false);
|
|
|
|
|
|
|
|
Mat inp;
|
|
|
|
resize(imread(imgPath), inp, Size(300, 300));
|
|
|
|
inp = blobFromImage(inp, 1.0f / 127.5, Size(), Scalar(127.5, 127.5, 127.5), true);
|
|
|
|
|
|
|
|
std::vector<String> outNames(3);
|
|
|
|
outNames[0] = "concat";
|
|
|
|
outNames[1] = "concat_1";
|
|
|
|
outNames[2] = "detection_out";
|
|
|
|
|
|
|
|
std::vector<Mat> target(outNames.size());
|
|
|
|
for (int i = 0; i < outNames.size(); ++i)
|
|
|
|
{
|
|
|
|
std::string path = findDataFile("dnn/tensorflow/ssd_mobilenet_v1_coco." + outNames[i] + ".npy", false);
|
|
|
|
target[i] = blobFromNPY(path);
|
|
|
|
}
|
|
|
|
|
|
|
|
Net net = readNetFromTensorflow(netPath, netConfig);
|
|
|
|
|
|
|
|
net.setPreferableBackend(DNN_BACKEND_DEFAULT);
|
|
|
|
net.setPreferableTarget(DNN_TARGET_OPENCL);
|
|
|
|
|
|
|
|
net.setInput(inp);
|
|
|
|
|
|
|
|
std::vector<Mat> output;
|
|
|
|
net.forward(output, outNames);
|
|
|
|
|
2018-02-19 20:56:40 +08:00
|
|
|
normAssert(target[0].reshape(1, 1), output[0].reshape(1, 1));
|
2018-02-12 19:14:41 +08:00
|
|
|
normAssert(target[1].reshape(1, 1), output[1].reshape(1, 1), "", 1e-5, 3e-4);
|
2017-12-19 16:59:46 +08:00
|
|
|
normAssert(target[2].reshape(1, 1), output[2].reshape(1, 1), "", 4e-5, 1e-2);
|
|
|
|
}
|
|
|
|
|
2018-02-19 20:56:40 +08:00
|
|
|
OCL_TEST(Test_TensorFlow, Inception_v2_SSD)
|
|
|
|
{
|
|
|
|
std::string proto = findDataFile("dnn/ssd_inception_v2_coco_2017_11_17.pbtxt", false);
|
|
|
|
std::string model = findDataFile("dnn/ssd_inception_v2_coco_2017_11_17.pb", false);
|
|
|
|
|
|
|
|
Net net = readNetFromTensorflow(model, proto);
|
|
|
|
Mat img = imread(findDataFile("dnn/street.png", false));
|
|
|
|
Mat blob = blobFromImage(img, 1.0f / 127.5, Size(300, 300), Scalar(127.5, 127.5, 127.5), true, false);
|
|
|
|
|
|
|
|
net.setPreferableBackend(DNN_BACKEND_DEFAULT);
|
|
|
|
net.setPreferableTarget(DNN_TARGET_OPENCL);
|
|
|
|
|
|
|
|
net.setInput(blob);
|
|
|
|
// Output has shape 1x1xNx7 where N - number of detections.
|
|
|
|
// An every detection is a vector of values [id, classId, confidence, left, top, right, bottom]
|
|
|
|
Mat out = net.forward();
|
|
|
|
out = out.reshape(1, out.total() / 7);
|
|
|
|
|
|
|
|
Mat detections;
|
|
|
|
for (int i = 0; i < out.rows; ++i)
|
|
|
|
{
|
|
|
|
if (out.at<float>(i, 2) > 0.5)
|
|
|
|
detections.push_back(out.row(i).colRange(1, 7));
|
|
|
|
}
|
|
|
|
|
|
|
|
Mat ref = (Mat_<float>(5, 6) << 1, 0.90176028, 0.19872092, 0.36311883, 0.26461923, 0.63498729,
|
|
|
|
3, 0.93569964, 0.64865261, 0.45906419, 0.80675775, 0.65708131,
|
|
|
|
3, 0.75838411, 0.44668293, 0.45907149, 0.49459291, 0.52197015,
|
|
|
|
10, 0.95932811, 0.38349164, 0.32528657, 0.40387636, 0.39165527,
|
|
|
|
10, 0.93973452, 0.66561931, 0.37841269, 0.68074018, 0.42907384);
|
|
|
|
normAssert(detections, ref);
|
|
|
|
}
|
|
|
|
|
2017-08-25 19:45:03 +08:00
|
|
|
TEST(Test_TensorFlow, lstm)
|
|
|
|
{
|
2018-01-04 02:21:04 +08:00
|
|
|
runTensorFlowNet("lstm", DNN_TARGET_CPU, true);
|
2017-08-25 19:45:03 +08:00
|
|
|
}
|
|
|
|
|
2017-10-03 03:44:42 +08:00
|
|
|
TEST(Test_TensorFlow, split)
|
|
|
|
{
|
|
|
|
runTensorFlowNet("split_equals");
|
|
|
|
}
|
|
|
|
|
2017-10-06 19:24:01 +08:00
|
|
|
TEST(Test_TensorFlow, resize_nearest_neighbor)
|
|
|
|
{
|
|
|
|
runTensorFlowNet("resize_nearest_neighbor");
|
|
|
|
}
|
|
|
|
|
2018-02-01 00:12:37 +08:00
|
|
|
TEST(Test_TensorFlow, slice)
|
|
|
|
{
|
|
|
|
runTensorFlowNet("slice_4d");
|
|
|
|
}
|
|
|
|
|
2017-10-28 00:01:41 +08:00
|
|
|
TEST(Test_TensorFlow, memory_read)
|
|
|
|
{
|
|
|
|
double l1 = 1e-5;
|
|
|
|
double lInf = 1e-4;
|
2018-01-04 02:21:04 +08:00
|
|
|
runTensorFlowNet("lstm", DNN_TARGET_CPU, true, l1, lInf, true);
|
2017-10-28 00:01:41 +08:00
|
|
|
|
2018-01-04 02:21:04 +08:00
|
|
|
runTensorFlowNet("batch_norm", DNN_TARGET_CPU, false, l1, lInf, true);
|
|
|
|
runTensorFlowNet("fused_batch_norm", DNN_TARGET_CPU, false, l1, lInf, true);
|
|
|
|
runTensorFlowNet("batch_norm_text", DNN_TARGET_CPU, true, l1, lInf, true);
|
2017-10-28 00:01:41 +08:00
|
|
|
}
|
|
|
|
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|