Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
@@ -62,7 +62,7 @@ class MultiscaleAnchorGenerator:
|
||||
|
||||
def createSSDGraph(modelPath, configPath, outputPath):
|
||||
# Nodes that should be kept.
|
||||
keepOps = ['Conv2D', 'BiasAdd', 'Add', 'Relu', 'Relu6', 'Placeholder', 'FusedBatchNorm',
|
||||
keepOps = ['Conv2D', 'BiasAdd', 'Add', 'AddV2', 'Relu', 'Relu6', 'Placeholder', 'FusedBatchNorm',
|
||||
'DepthwiseConv2dNative', 'ConcatV2', 'Mul', 'MaxPool', 'AvgPool', 'Identity',
|
||||
'Sub', 'ResizeNearestNeighbor', 'Pad', 'FusedBatchNormV3']
|
||||
|
||||
@@ -151,6 +151,9 @@ def createSSDGraph(modelPath, configPath, outputPath):
|
||||
subgraphBatchNorm = ['Add',
|
||||
['Mul', 'input', ['Mul', ['Rsqrt', ['Add', 'moving_variance', 'add_y']], 'gamma']],
|
||||
['Sub', 'beta', ['Mul', 'moving_mean', 'Mul_0']]]
|
||||
subgraphBatchNormV2 = ['AddV2',
|
||||
['Mul', 'input', ['Mul', ['Rsqrt', ['AddV2', 'moving_variance', 'add_y']], 'gamma']],
|
||||
['Sub', 'beta', ['Mul', 'moving_mean', 'Mul_0']]]
|
||||
# Detect unfused nearest neighbor resize.
|
||||
subgraphResizeNN = ['Reshape',
|
||||
['Mul', ['Reshape', 'input', ['Pack', 'shape_1', 'shape_2', 'shape_3', 'shape_4', 'shape_5']],
|
||||
@@ -177,7 +180,8 @@ def createSSDGraph(modelPath, configPath, outputPath):
|
||||
for node in graph_def.node:
|
||||
inputs = {}
|
||||
fusedNodes = []
|
||||
if checkSubgraph(node, subgraphBatchNorm, inputs, fusedNodes):
|
||||
if checkSubgraph(node, subgraphBatchNorm, inputs, fusedNodes) or \
|
||||
checkSubgraph(node, subgraphBatchNormV2, inputs, fusedNodes):
|
||||
name = node.name
|
||||
node.Clear()
|
||||
node.name = name
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
|
||||
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS // eliminate build warning
|
||||
#define CL_TARGET_OPENCL_VERSION 200 // 2.0
|
||||
|
||||
#ifdef __APPLE__
|
||||
#define CL_SILENCE_DEPRECATION
|
||||
@@ -677,7 +678,7 @@ int App::initVideoSource()
|
||||
throw std::runtime_error(std::string("specify video source"));
|
||||
}
|
||||
|
||||
catch (const std::exception e)
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
cerr << "ERROR: " << e.what() << std::endl;
|
||||
return -1;
|
||||
|
||||
@@ -26,7 +26,6 @@ import cv2 as cv
|
||||
|
||||
import video
|
||||
from common import anorm2, draw_str
|
||||
from time import clock
|
||||
|
||||
lk_params = dict( winSize = (15, 15),
|
||||
maxLevel = 2,
|
||||
|
||||
@@ -39,9 +39,6 @@ import re
|
||||
|
||||
from numpy import pi, sin, cos
|
||||
|
||||
# built-in modules
|
||||
from time import clock
|
||||
|
||||
# local modules
|
||||
from tst_scene_render import TestSceneRender
|
||||
import common
|
||||
|
||||
Reference in New Issue
Block a user