Commit 4ae5df55 authored by Dmitry Kurtaev's avatar Dmitry Kurtaev

SSD with FPN proposals from TensorFlow

parent 71aee662
......@@ -289,7 +289,7 @@ def removeUnusedNodesAndAttrs(to_remove, graph_def):
op = graph_def.node[i].op
name = graph_def.node[i].name
if op == 'Const' or to_remove(name, op):
if to_remove(name, op):
if op != 'Const':
removedNodes.append(name)
......
......@@ -49,7 +49,7 @@ def createFasterRCNNGraph(modelPath, configPath, outputPath):
removeIdentity(graph_def)
def to_remove(name, op):
return name.startswith(scopesToIgnore) or not name.startswith(scopesToKeep) or \
return op == 'Const' or name.startswith(scopesToIgnore) or not name.startswith(scopesToKeep) or \
(name.startswith('CropAndResize') and op != 'CropAndResize')
removeUnusedNodesAndAttrs(to_remove, graph_def)
......
......@@ -55,7 +55,7 @@ graph_def = parseTextGraph(args.output)
removeIdentity(graph_def)
def to_remove(name, op):
return name.startswith(scopesToIgnore) or not name.startswith(scopesToKeep) or \
return op == 'Const' or name.startswith(scopesToIgnore) or not name.startswith(scopesToKeep) or \
(name.startswith('CropAndResize') and op != 'CropAndResize')
removeUnusedNodesAndAttrs(to_remove, graph_def)
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment