Fix OOB ssd_resnet34_300x300 and resnet-50 regression
@@ -21,7 +21,7 @@ def summarize_graph(graph_def, fix_dynamic_shape):
if node.op == 'Placeholder':
node_dict = dict()
node_dict['type'] = tf_v1.DType(node.attr['dtype'].type).name
-
+ is_one_dim = False
if node_dict['type'] != 'bool':
# convert shape to list
try:
@@ -31,12 +31,10 @@ def summarize_graph(graph_def, fix_dynamic_shape):
else:
node_dict['shape'] = [item.value if item.value != None else fix_dynamic_shape for item in _shape]
# if shape dimension > 1, suppose first dimension is batch-size
- is_one_dim = False
if len(node_dict['shape']) > 1:
node_dict['shape'] = node_dict['shape'][1:]
else:
is_one_dim = True
- node_dict['is_one_dim'] = is_one_dim
except ValueError as e:
print(str(e))
_shape = [fix_dynamic_shape, fix_dynamic_shape, 3]
@@ -45,7 +43,7 @@ def summarize_graph(graph_def, fix_dynamic_shape):
else: # deal with bool dtype inputs, now assign bool dtype input False value
node_dict['shape'] = None
node_dict['value'] = False
-
+ node_dict['is_one_dim'] = is_one_dim
print("********** Find input node: {}".format(node_dict))
placeholders[node.name] = node_dict
