"""
- Copyright (c) 2018 Intel Corporation
+ Copyright (c) 2018-2019 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
'scaleshift_1': {'type': 'ScaleShift', 'kind': 'op', 'op': 'ScaleShift'},
'scaleshift_1_w': {'value': None, 'shape': None, 'kind': 'data'},
'scaleshift_1_b': {'value': None, 'shape': None, 'kind': 'data'},
+ 'const_scaleshift_1_w': {'value': None, 'shape': None, 'kind': 'op', 'data_type': None},
+ 'const_scaleshift_1_b': {'value': None, 'shape': None, 'kind': 'op', 'data_type': None},
'scaleshift_1_data': {'value': None, 'shape': None, 'kind': 'data'},
# Mul and Add operations
'mul_1': {'type': 'Mul', 'kind': 'op', 'op': 'Mul', 'can_be_fused': True},
'mul_1_w': {'value': None, 'shape': None, 'kind': 'data', 'data_type': None},
+ 'const_mul_1_w': {'value': None, 'shape': None, 'kind': 'op', 'data_type': None},
'mul_1_data': {'value': None, 'shape': None, 'kind': 'data', 'data_type': None},
'add_1': {'type': 'Add', 'kind': 'op', 'op': 'Add', 'can_be_fused': True},
'add_1_w': {'value': None, 'shape': None, 'kind': 'data', 'data_type': None},
+ 'const_add_1_w': {'value': None, 'shape': None, 'kind': 'op', 'data_type': None},
'add_1_data': {'value': None, 'shape': None, 'kind': 'data', 'data_type': None},
# Mul2 and Add2 operations
'mul_2': {'type': 'Mul', 'kind': 'op', 'op': 'Mul', 'can_be_fused': True},
'mul_2_w': {'value': None, 'shape': None, 'kind': 'data', 'data_type': None},
+ 'const_mul_2_w': {'value': None, 'shape': None, 'kind': 'op', 'data_type': None},
'mul_2_data': {'value': None, 'shape': None, 'kind': 'data', 'data_type': None},
'add_2': {'type': 'Add', 'kind': 'op', 'op': 'Add', 'can_be_fused': True},
'add_2_w': {'value': None, 'shape': None, 'kind': 'data', 'data_type': None},
+ 'const_add_2_w': {'value': None, 'shape': None, 'kind': 'op', 'data_type': None},
'add_2_data': {'value': None, 'shape': None, 'kind': 'data', 'data_type': None},
# Concat1 operation
'concat_1': {'type': 'Concat', 'kind': 'op', 'op': 'Concat'},
'conv_1': {'type': 'Convolution', 'kind': 'op', 'op': 'Conv2D', 'layout': 'NHWC'},
'conv_1_w': {'value': None, 'shape': None, 'kind': 'data'},
'conv_1_b': {'value': None, 'shape': None, 'kind': 'data'},
+ 'const_conv_1_w': {'value': None, 'shape': None, 'kind': 'op', 'data_type': None},
+ 'const_conv_1_b': {'value': None, 'shape': None, 'kind': 'op', 'data_type': None},
'conv_1_data': {'value': None, 'shape': None, 'kind': 'data'},
'conv_2': {'type': 'Convolution', 'kind': 'op', 'op': 'Conv2D', 'layout': 'NHWC'},
'conv_2_w': {'value': None, 'shape': None, 'kind': 'data'},
'conv_2_b': {'value': None, 'shape': None, 'kind': 'data'},
+ 'const_conv_2_w': {'value': None, 'shape': None, 'kind': 'op', 'data_type': None},
+ 'const_conv_2_b': {'value': None, 'shape': None, 'kind': 'op', 'data_type': None},
'conv_2_data': {'value': None, 'shape': None, 'kind': 'data'},
# FullyConnected
'fc_1': {'type': 'FullyConnected', 'kind': 'op', 'op': 'InnerProduct', 'layout': 'NHWC'},
'fc_1_w': {'value': None, 'shape': None, 'kind': 'data'},
'fc_1_b': {'value': None, 'shape': None, 'kind': 'data'},
+ 'const_fc_1_w': {'value': None, 'shape': None, 'kind': 'op', 'data_type': None},
+ 'const_fc_1_b': {'value': None, 'shape': None, 'kind': 'op', 'data_type': None},
'fc_1_data': {'value': None, 'shape': None, 'kind': 'data'},
# Placeholders
'placeholder_2': {'shape': None, 'type': 'Placeholder', 'kind': 'op', 'op': 'Placeholder'},
'placeholder_2_data': {'value': None, 'shape': None, 'kind': 'data', 'data_type': None},
'placeholder_3': {'shape': None, 'type': 'Placeholder', 'kind': 'op', 'op': 'Placeholder'},
'placeholder_3_data': {'value': None, 'shape': None, 'kind': 'data', 'data_type': None},
+ 'op_output': {'kind': 'op', 'op': 'OpOutput'},
+ 'op_output_1': {'kind': 'op', 'op': 'OpOutput'},
+ 'op_output_2': {'kind': 'op', 'op': 'OpOutput'}
}
graph = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'mul_1'),
+ ('const_mul_1_w', 'mul_1_w'),
('mul_1_w', 'mul_1'),
('mul_1', 'mul_1_data'),
('mul_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1', 'conv_1_data'),
+ ('conv_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
'mul_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_mul_1_w': {'shape': np.array([3]), 'value': np.array([1, 2, 3])},
'mul_1_w': {'shape': np.array([3]), 'value': np.array([1, 2, 3])},
+ 'const_conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96))},
'conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96)),
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
- 'conv_1_data': {'is_output': True}
+ 'conv_1_data': {}
})
ref_weights = np.ones((11, 11, 3, 96)) * np.reshape(np.array([1, 2, 3]), (3, 1))
graph_ref = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1', 'conv_1_data'),
+ ('conv_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_conv_1_w': {'shape': ref_weights.shape, 'value': ref_weights},
'conv_1_w': {'shape': ref_weights.shape, 'value': ref_weights,
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
- 'conv_1_data': {'is_output': True}
+ 'conv_1_data': {}
})
_fuse_mul(graph, Node(graph, 'mul_1'), [Node(graph, 'conv_1')], backward=False)
graph = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'mul_1'),
+ ('const_mul_1_w', 'mul_1_w'),
('mul_1_w', 'mul_1'),
('mul_1', 'mul_1_data'),
('mul_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1', 'conv_1_data'),
+ ('conv_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
'mul_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_mul_1_w': {'shape': np.array([1]), 'value': 6},
'mul_1_w': {'shape': np.array([1]), 'value': 6},
+ 'const_conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96))},
'conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96)),
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
- 'conv_1_data': {'is_output': True}
+ 'conv_1_data': {}
})
ref_weights = np.ones((11, 11, 3, 96)) * np.reshape(np.array([6, 6, 6]), (3, 1))
graph_ref = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1', 'conv_1_data'),
+ ('conv_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_conv_1_w': {'shape': ref_weights.shape, 'value': ref_weights},
'conv_1_w': {'shape': ref_weights.shape, 'value': ref_weights,
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
- 'conv_1_data': {'is_output': True}
+ 'conv_1_data': {}
})
_fuse_mul(graph, Node(graph, 'mul_1'), [Node(graph, 'conv_1')], backward=False)
graph = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1', 'conv_1_data'),
('conv_1_data', 'mul_1'),
+ ('const_mul_1_w', 'mul_1_w'),
('mul_1_w', 'mul_1'),
('mul_1', 'mul_1_data'),
+ ('mul_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96))},
'conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96)),
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_1_b': {'shape': np.array([96]), 'value': np.ones(96)},
'conv_1_b': {'shape': np.array([96]), 'value': np.ones(96)},
'conv_1_data': {'shape': np.array([1, 55, 55, 96])},
- 'mul_1_data': {'shape': np.array([1, 55, 55, 96]), 'is_output': True},
+ 'mul_1_data': {'shape': np.array([1, 55, 55, 96])},
+ 'const_mul_1_w': {'shape': np.array([96]), 'value': np.array([x for x in range(96)])},
'mul_1_w': {'shape': np.array([96]), 'value': np.array([x for x in range(96)])},
})
ref_weights = np.ones((11, 11, 3, 96)) * np.reshape(np.array([x for x in range(96)]), 96)
graph_ref = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1', 'conv_1_data'),
+ ('conv_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_conv_1_w': {'shape': ref_weights.shape, 'value': ref_weights},
'conv_1_w': {'shape': ref_weights.shape, 'value': ref_weights,
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_1_b': {'shape': ref_biases.shape, 'value': ref_biases},
'conv_1_b': {'shape': ref_biases.shape, 'value': ref_biases},
- 'conv_1_data': {'shape': np.array([1, 55, 55, 96]), 'is_output': True}
+ 'conv_1_data': {'shape': np.array([1, 55, 55, 96])}
})
_fuse_mul(graph, Node(graph, 'mul_1'), [Node(graph, 'conv_1')], backward=True)
graph = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1', 'conv_1_data'),
('conv_1_data', 'mul_1'),
+ ('const_mul_1_w', 'mul_1_w'),
('mul_1_w', 'mul_1'),
('mul_1', 'mul_1_data'),
+ ('mul_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96))},
'conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96)),
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_1_b': {'shape': np.array([96]), 'value': np.ones(96)},
'conv_1_b': {'shape': np.array([96]), 'value': np.ones(96)},
'conv_1_data': {'shape': np.array([1, 55, 55, 96])},
- 'mul_1_data': {'shape': np.array([1, 55, 55, 96]), 'is_output': True},
+ 'mul_1_data': {'shape': np.array([1, 55, 55, 96])},
+ 'const_mul_1_w': {'shape': np.array([1]), 'value': 6},
'mul_1_w': {'shape': np.array([1]), 'value': 6},
})
ref_weights = np.ones((11, 11, 3, 96)) * np.array([6])
graph_ref = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1', 'conv_1_data'),
+ ('conv_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_conv_1_w': {'shape': ref_weights.shape, 'value': ref_weights},
'conv_1_w': {'shape': ref_weights.shape, 'value': ref_weights,
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_1_b': {'shape': ref_biases.shape, 'value': ref_biases},
'conv_1_b': {'shape': ref_biases.shape, 'value': ref_biases},
- 'conv_1_data': {'shape': np.array([1, 55, 55, 96]), 'is_output': True}
+ 'conv_1_data': {'shape': np.array([1, 55, 55, 96])}
})
_fuse_mul(graph, Node(graph, 'mul_1'), [Node(graph, 'conv_1')], backward=True)
graph = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'mul_1'),
+ ('const_mul_1_w', 'mul_1_w'),
('mul_1_w', 'mul_1'),
('mul_1', 'mul_1_data'),
('mul_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1', 'conv_1_data'),
('placeholder_3_data', 'concat_1'),
('conv_1_data', 'concat_1'),
('concat_1', 'concat_1_data'),
+ ('concat_1_data', 'op_output')
+
],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
'mul_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_mul_1_w': {'shape': np.array([1]), 'value': 6},
'mul_1_w': {'shape': np.array([1]), 'value': 6},
+ 'const_conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96))},
'conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96)),
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
- 'concat_1_data': {'is_output': True}
+ 'concat_1_data': {}
})
ref_weights = np.ones((11, 11, 3, 96)) * np.reshape(np.array([6, 6, 6]), (3, 1))
graph_ref = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1', 'conv_1_data'),
('placeholder_3_data', 'concat_1'),
('conv_1_data', 'concat_1'),
('concat_1', 'concat_1_data'),
+ ('concat_1_data', 'op_output'),
],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_conv_1_w': {'shape': ref_weights.shape, 'value': ref_weights},
'conv_1_w': {'shape': ref_weights.shape, 'value': ref_weights,
'output_channel_dim': 3,
'input_channel_dim': 2, 'dims_number': 4},
+ 'const_conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
- 'conv_1_data': {'is_output': True},
- 'placeholder_2_data': {'is_output': True},
- 'placeholder_3_data': {'is_output': True},
+ 'conv_1_data': {},
+ 'placeholder_2_data': {},
+ 'placeholder_3_data': {},
})
_fuse_mul(graph, Node(graph, 'mul_1'), [Node(graph, 'conv_1')], backward=False)
graph = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'mul_1'),
+ ('const_mul_1_w', 'mul_1_w'),
('mul_1_w', 'mul_1'),
('mul_1', 'mul_1_data'),
('mul_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1', 'conv_1_data'),
('placeholder_3_data', 'concat_1'),
('conv_1_data', 'concat_1'),
('concat_1', 'concat_1_data'),
+ ('concat_1_data', 'op_output'),
+
],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
'mul_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_mul_1_w': {'shape': np.array([1]), 'value': np.array([6])},
'mul_1_w': {'shape': np.array([1]), 'value': np.array([6])},
+ 'const_conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96))},
'conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96)),
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
- 'concat_1_data': {'is_output': True}
+ 'concat_1_data': {}
})
ref_weights = np.ones((11, 11, 3, 96)) * np.reshape(np.array([6, 6, 6]), (3, 1))
graph_ref = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1', 'conv_1_data'),
('placeholder_3_data', 'concat_1'),
('conv_1_data', 'concat_1'),
('concat_1', 'concat_1_data'),
+ ('concat_1_data', 'op_output'),
],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_conv_1_w': {'shape': ref_weights.shape, 'value': ref_weights},
'conv_1_w': {'shape': ref_weights.shape, 'value': ref_weights,
'output_channel_dim': 3,
'input_channel_dim': 2, 'dims_number': 4},
+ 'const_conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
- 'conv_1_data': {'is_output': True},
- 'placeholder_2_data': {'is_output': True},
- 'placeholder_3_data': {'is_output': True},
+ 'conv_1_data': {},
+ 'placeholder_2_data': {},
+ 'placeholder_3_data': {},
})
_fuse_mul(graph, Node(graph, 'mul_1'), [Node(graph, 'conv_1')], backward=False)
graph = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'mul_1'),
+ ('const_mul_1_w', 'mul_1_w'),
('mul_1_w', 'mul_1'),
('mul_1', 'mul_1_data'),
('mul_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1', 'conv_1_data'),
('mul_1_data', 'conv_2'),
+ ('const_conv_2_w', 'conv_2_w'),
+ ('const_conv_2_b', 'conv_2_b'),
('conv_2_w', 'conv_2'),
('conv_2_b', 'conv_2'),
('conv_2', 'conv_2_data'),
('conv_1_data', 'concat_1'),
('conv_2_data', 'concat_1'),
- ('concat_1', 'concat_1_data')
+ ('concat_1', 'concat_1_data'),
+ ('concat_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
'mul_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_mul_1_w': {'shape': np.array([3]), 'value': np.array([1, 2, 3])},
'mul_1_w': {'shape': np.array([3]), 'value': np.array([1, 2, 3])},
+ 'const_conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96))},
'conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96)),
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_data': {'shape': np.array([1, 55, 55, 96])},
+ 'const_conv_2_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96))},
'conv_2_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96)),
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_2_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_2_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_2_data': {'shape': np.array([1, 55, 55, 96])},
- 'concat_1_data': {'is_output': True}
+ 'concat_1_data': {}
})
ref_weights = np.ones((11, 11, 3, 96)) * np.reshape(np.array([1, 2, 3]), (3, 1))
graph_ref = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1', 'conv_1_data'),
('placeholder_1_data', 'conv_2'),
+ ('const_conv_2_w', 'conv_2_w'),
+ ('const_conv_2_b', 'conv_2_b'),
('conv_2_w', 'conv_2'),
('conv_2_b', 'conv_2'),
('conv_2', 'conv_2_data'),
('conv_1_data', 'concat_1'),
('conv_2_data', 'concat_1'),
- ('concat_1', 'concat_1_data')
+ ('concat_1', 'concat_1_data'),
+ ('concat_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_conv_1_w': {'shape': ref_weights.shape, 'value': ref_weights},
'conv_1_w': {'shape': ref_weights.shape, 'value': ref_weights,
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_data': {'shape': np.array([1, 55, 55, 96])},
+ 'const_conv_2_w': {'shape': ref_weights.shape, 'value': ref_weights},
'conv_2_w': {'shape': ref_weights.shape, 'value': ref_weights,
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_2_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_2_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_2_data': {'shape': np.array([1, 55, 55, 96])},
})
graph = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'mul_1'),
+ ('const_mul_1_w', 'mul_1_w'),
('mul_1_w', 'mul_1'),
('mul_1', 'mul_1_data'),
('mul_1_data', 'fc_1'),
+ ('const_fc_1_w', 'fc_1_w'),
+ ('const_fc_1_b', 'fc_1_b'),
('fc_1_w', 'fc_1'),
('fc_1_b', 'fc_1'),
('fc_1', 'fc_1_data'),
+ ('fc_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 2048])},
'mul_1_data': {'shape': np.array([1, 2048])},
+ 'const_mul_1_w': {'shape': np.array([2048]), 'value': np.array([x for x in range(2048)])},
'mul_1_w': {'shape': np.array([2048]), 'value': np.array([x for x in range(2048)])},
+ 'const_fc_1_w': {'shape': np.array([10260, 2048]), 'value': np.ones((10260, 2048))},
'fc_1_w': {'shape': np.array([10260, 2048]), 'value': np.ones((10260, 2048)),
'output_channel_dim': 0, 'input_channel_dim': 1,
'dims_number': 2},
+ 'const_fc_1_b': {'shape': np.array([10260]), 'value': np.ones(10260)},
'fc_1_b': {'shape': np.array([10260]), 'value': np.ones(10260)},
- 'fc_1_data': {'shape': np.array([1, 10260]), 'is_output': True},
+ 'fc_1_data': {'shape': np.array([1, 10260])},
})
ref_weights = np.ones((10260, 2048)) * np.array([x for x in range(2048)])
graph_ref = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'fc_1'),
+ ('const_fc_1_w', 'fc_1_w'),
+ ('const_fc_1_b', 'fc_1_b'),
('fc_1_w', 'fc_1'),
('fc_1_b', 'fc_1'),
('fc_1', 'fc_1_data'),
+ ('fc_1_data', 'op_output')
+
],
{'placeholder_1_data': {'shape': np.array([1, 2048])},
+ 'const_fc_1_w': {'shape': ref_weights.shape, 'value': ref_weights},
'fc_1_w': {'shape': ref_weights.shape, 'value': ref_weights,
'output_channel_dim': 0, 'input_channel_dim': 1,
'dims_number': 2},
+ 'const_fc_1_b': {'shape': np.array([10260]), 'value': np.ones(10260)},
'fc_1_b': {'shape': np.array([10260]), 'value': np.ones(10260)},
- 'fc_1_data': {'shape': np.array([1, 10260]), 'is_output': True},
+ 'fc_1_data': {'shape': np.array([1, 10260])},
})
_fuse_mul(graph, Node(graph, 'mul_1'), [Node(graph, 'fc_1')], backward=False)
graph = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'mul_1'),
+ ('const_mul_1_w', 'mul_1_w'),
('mul_1_w', 'mul_1'),
('mul_1', 'mul_1_data'),
('mul_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1', 'conv_1_data'),
+ ('conv_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
'mul_1_data': {'shape': np.array([1, 227, 227, 3])},
- 'mul_1_w': {'shape': np.array([1]), 'value': 6},
+ 'const_mul_1_w': {'shape': np.array([]), 'value': np.array(6)},
+ 'mul_1_w': {'shape': np.array([]), 'value': np.array(6)},
'conv_1': {'can_be_fused': False},
+ 'const_conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96))},
'conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96)),
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
- 'conv_1_data': {'is_output': True}
+ 'conv_1_data': {}
})
graph_ref = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'mul_1'),
+ ('const_mul_1_w', 'mul_1_w'),
('mul_1_w', 'mul_1'),
('mul_1', 'mul_1_data'),
('mul_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1', 'conv_1_data'),
+ ('conv_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
'mul_1_data': {'shape': np.array([1, 227, 227, 3])},
- 'mul_1_w': {'shape': np.array([1]), 'value': 6},
+ 'const_mul_1_w': {'shape': np.array([]), 'value': np.array(6)},
+ 'mul_1_w': {'shape': np.array([]), 'value': np.array(6)},
'conv_1': {'can_be_fused': False},
+ 'const_conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96))},
'conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96)),
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
- 'conv_1_data': {'is_output': True}
+ 'conv_1_data': {}
})
_fuse_mul(graph, Node(graph, 'mul_1'), [Node(graph, 'conv_1')], backward=False)
graph = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'mul_1'),
+ ('const_mul_1_w', 'mul_1_w'),
('mul_1_w', 'mul_1'),
('mul_1', 'mul_1_data'),
('mul_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
('conv_1_w', 'conv_1'),
('conv_1', 'conv_1_data'),
+ ('conv_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 112, 112, 6])},
'mul_1_data': {'shape': np.array([1, 112, 112, 6])},
+ 'const_mul_1_w': {'shape': np.array([6]), 'value': np.array([1, 2, 3, 4, 5, 6])},
'mul_1_w': {'shape': np.array([6]), 'value': np.array([1, 2, 3, 4, 5, 6])},
+ 'const_conv_1_w': {'shape': np.array([3, 3, 6, 1]), 'value': np.ones((3, 3, 6, 1))},
'conv_1_w': {'shape': np.array([3, 3, 6, 1]), 'value': np.ones((3, 3, 6, 1)),
'output_channel_dim': 2, 'input_channel_dim': 2,
'dims_number': 4},
- 'conv_1_data': {'is_output': True}
+ 'conv_1_data': {}
})
ref_weights = np.ones((3, 3, 6, 1)) * np.reshape(np.array([1, 2, 3, 4, 5, 6]), (6, 1))
graph_ref = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
('conv_1_w', 'conv_1'),
('conv_1', 'conv_1_data'),
+ ('conv_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 112, 112, 6])},
+ 'const_conv_1_w': {'shape': ref_weights.shape, 'value': ref_weights},
'conv_1_w': {'shape': ref_weights.shape, 'value': ref_weights,
'output_channel_dim': 2, 'input_channel_dim': 2,
'dims_number': 4},
- 'conv_1_data': {'is_output': True}
+ 'conv_1_data': {}
})
_fuse_mul(graph, Node(graph, 'mul_1'), [Node(graph, 'conv_1')], backward=False)
graph = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
('conv_1_w', 'conv_1'),
('conv_1', 'conv_1_data'),
('conv_1_data', 'mul_1'),
+ ('const_mul_1_w', 'mul_1_w'),
('mul_1_w', 'mul_1'),
('mul_1', 'mul_1_data'),
+ ('mul_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 112, 112, 6])},
- 'mul_1_data': {'shape': np.array([1, 112, 112, 6]), 'is_output': True},
+ 'mul_1_data': {'shape': np.array([1, 112, 112, 6])},
+ 'const_mul_1_w': {'shape': np.array([6]), 'value': np.array([1, 2, 3, 4, 5, 6])},
'mul_1_w': {'shape': np.array([6]), 'value': np.array([1, 2, 3, 4, 5, 6])},
+ 'const_conv_1_w': {'shape': np.array([3, 3, 6, 1]), 'value': np.ones((3, 3, 6, 1))},
'conv_1_w': {'shape': np.array([3, 3, 6, 1]), 'value': np.ones((3, 3, 6, 1)),
'output_channel_dim': 2, 'input_channel_dim': 2,
'dims_number': 4},
- 'conv_1_data': {'is_output': True}
+ 'conv_1_data': {}
})
ref_weights = np.ones((3, 3, 6, 1)) * np.reshape(np.array([1, 2, 3, 4, 5, 6]), (6, 1))
graph_ref = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
('conv_1_w', 'conv_1'),
('conv_1', 'conv_1_data'),
+ ('conv_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 112, 112, 6])},
+ 'const_conv_1_w': {'shape': ref_weights.shape, 'value': ref_weights},
'conv_1_w': {'shape': ref_weights.shape, 'value': ref_weights,
'output_channel_dim': 2, 'input_channel_dim': 2,
'dims_number': 4},
graph = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'add_1'),
+ ('const_add_1_w', 'add_1_w'),
('add_1_w', 'add_1'),
('add_1', 'add_1_data'),
('add_1_data', 'fc_1'),
+ ('const_fc_1_w', 'fc_1_w'),
+ ('const_fc_1_b', 'fc_1_b'),
('fc_1_w', 'fc_1'),
('fc_1_b', 'fc_1'),
('fc_1', 'fc_1_data'),
+ ('fc_1_data', 'op_output')
+
],
{'placeholder_1_data': {'shape': np.array([1, 2048])},
'add_1_data': {'shape': np.array([1, 2048])},
+ 'const_add_1_w': {'shape': np.array([2048]), 'value': np.array([x for x in range(2048)])},
'add_1_w': {'shape': np.array([2048]), 'value': np.array([x for x in range(2048)])},
+ 'const_fc_1_w': {'shape': np.array([10260, 2048]), 'value': np.ones((10260, 2048))},
'fc_1_w': {'shape': np.array([10260, 2048]), 'value': np.ones((10260, 2048)),
'output_channel_dim': 0, 'input_channel_dim': 1,
'dims_number': 2},
+ 'const_fc_1_b': {'shape': np.array([10260]), 'value': np.ones(10260)},
'fc_1_b': {'shape': np.array([10260]), 'value': np.ones(10260)},
- 'fc_1_data': {'shape': np.array([1, 10260]), 'is_output': True},
+ 'fc_1_data': {'shape': np.array([1, 10260])},
})
ref_weights = np.ones((10260, 2048))
ref_biases = np.ones(10260) + np.dot(np.ones((10260, 2048)), np.array([x for x in range(2048)]))
graph_ref = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'fc_1'),
+ ('const_fc_1_w', 'fc_1_w'),
+ ('const_fc_1_b', 'fc_1_b'),
('fc_1_w', 'fc_1'),
('fc_1_b', 'fc_1'),
('fc_1', 'fc_1_data'),
+ ('fc_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 2048])},
+ 'const_fc_1_w': {'shape': ref_weights.shape, 'value': ref_weights},
'fc_1_w': {'shape': ref_weights.shape, 'value': ref_weights,
'output_channel_dim': 0, 'input_channel_dim': 1,
'dims_number': 2},
+ 'const_fc_1_b': {'shape': ref_biases.shape, 'value': ref_biases},
'fc_1_b': {'shape': ref_biases.shape, 'value': ref_biases},
- 'fc_1_data': {'shape': np.array([1, 10260]), 'is_output': True},
+ 'fc_1_data': {'shape': np.array([1, 10260])},
})
_fuse_add(graph, Node(graph, 'add_1'), [Node(graph, 'fc_1')], backward=False)
graph = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'fc_1'),
+ ('const_fc_1_w', 'fc_1_w'),
('fc_1_w', 'fc_1'),
('fc_1', 'fc_1_data'),
('fc_1_data', 'add_1'),
+ ('const_add_1_w', 'add_1_w'),
('add_1_w', 'add_1'),
('add_1', 'add_1_data'),
+ ('add_1_data', 'op_output_1')
],
{'placeholder_1_data': {'shape': np.array([1, 2048])},
- 'add_1_data': {'shape': np.array([1, 10260]), 'is_output': True},
+ 'add_1_data': {'shape': np.array([1, 10260])},
+ 'const_add_1_w': {'shape': np.array([10260]), 'value': np.array([x for x in range(10260)])},
'add_1_w': {'shape': np.array([10260]), 'value': np.array([x for x in range(10260)]),
'data_type': None},
+ 'const_fc_1_w': {'shape': np.array([10260, 2048]), 'value': np.ones((10260, 2048))},
'fc_1_w': {'shape': np.array([10260, 2048]), 'value': np.ones((10260, 2048)),
'output_channel_dim': 0, 'input_channel_dim': 1,
'dims_number': 2, 'data_type': None},
graph_ref = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'fc_1'),
+ ('const_fc_1_w', 'fc_1_w'),
+ ('const_fc_1_b', 'fc_1_b'),
('fc_1_w', 'fc_1'),
('fc_1_b', 'fc_1'),
('fc_1', 'fc_1_data'),
+ ('fc_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 2048])},
+ 'const_fc_1_w': {'shape': ref_weights.shape, 'value': ref_weights},
'fc_1_w': {'shape': ref_weights.shape, 'value': ref_weights,
'output_channel_dim': 0, 'input_channel_dim': 1,
'dims_number': 2},
+ 'const_fc_1_b': {'shape': ref_biases.shape, 'value': ref_biases},
'fc_1_b': {'shape': ref_biases.shape, 'value': ref_biases},
- 'fc_1_data': {'shape': np.array([1, 10260]), 'is_output': True},
+ 'fc_1_data': {'shape': np.array([1, 10260])},
})
_fuse_add(graph, Node(graph, 'add_1'), [Node(graph, 'fc_1')], backward=True)
graph = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'fc_1'),
+ ('const_fc_1_w', 'fc_1_w'),
('fc_1_w', 'fc_1'),
('fc_1', 'fc_1_data'),
('fc_1_data', 'add_1'),
+ ('const_add_1_w', 'add_1_w'),
('add_1_w', 'add_1'),
('add_1', 'add_1_data'),
+ ('add_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 2048])},
- 'add_1_data': {'shape': np.array([1, 10260]), 'is_output': True},
+ 'add_1_data': {'shape': np.array([1, 10260])},
+ 'const_add_1_w': {'shape': np.array([1]), 'value': 6, 'data_type': None},
'add_1_w': {'shape': np.array([1]), 'value': 6, 'data_type': None},
+ 'const_fc_1_w': {'shape': np.array([10260, 2048]), 'value': np.ones((10260, 2048))},
'fc_1_w': {'shape': np.array([10260, 2048]), 'value': np.ones((10260, 2048)),
'output_channel_dim': 0, 'input_channel_dim': 1,
'dims_number': 2, 'data_type': None},
graph_ref = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'fc_1'),
+ ('const_fc_1_w', 'fc_1_w'),
+ ('const_fc_1_b', 'fc_1_b'),
('fc_1_w', 'fc_1'),
('fc_1_b', 'fc_1'),
('fc_1', 'fc_1_data'),
+ ('fc_1_data', 'op_output')
+
],
{'placeholder_1_data': {'shape': np.array([1, 2048])},
+ 'const_fc_1_w': {'shape': ref_weights.shape, 'value': ref_weights},
'fc_1_w': {'shape': ref_weights.shape, 'value': ref_weights,
'output_channel_dim': 0, 'input_channel_dim': 1,
'dims_number': 2},
+ 'const_fc_1_b': {'shape': ref_biases.shape, 'value': ref_biases},
'fc_1_b': {'shape': ref_biases.shape, 'value': ref_biases},
- 'fc_1_data': {'shape': np.array([1, 10260]), 'is_output': True},
+ 'fc_1_data': {'shape': np.array([1, 10260])},
})
_fuse_add(graph, Node(graph, 'add_1'), [Node(graph, 'fc_1')], backward=True)
graph = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'add_1'),
+ ('const_add_1_w', 'add_1_w'),
('add_1_w', 'add_1'),
('add_1', 'add_1_data'),
('add_1_data', 'fc_1'),
+ ('const_fc_1_w', 'fc_1_w'),
+ ('const_fc_1_b', 'fc_1_b'),
('fc_1_w', 'fc_1'),
('fc_1_b', 'fc_1'),
('fc_1', 'fc_1_data'),
+ ('fc_1_data', 'op_output')
+
],
{'placeholder_1_data': {'shape': np.array([1, 2048])},
'add_1_data': {'shape': np.array([1, 2048])},
+ 'const_add_1_w': {'shape': np.array([2048]), 'value': np.array([x for x in range(2048)])},
'add_1_w': {'shape': np.array([2048]), 'value': np.array([x for x in range(2048)])},
'fc_1': {'can_be_fused': False},
+ 'const_fc_1_w': {'shape': np.array([10260, 2048]), 'value': np.ones((10260, 2048))},
'fc_1_w': {'shape': np.array([10260, 2048]), 'value': np.ones((10260, 2048)),
'output_channel_dim': 0, 'input_channel_dim': 1,
'dims_number': 2},
+ 'const_fc_1_b': {'shape': np.array([10260]), 'value': np.ones(10260)},
'fc_1_b': {'shape': np.array([10260]), 'value': np.ones(10260)},
- 'fc_1_data': {'shape': np.array([1, 10260]), 'is_output': True},
+ 'fc_1_data': {'shape': np.array([1, 10260])},
})
graph_ref = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'add_1'),
+ ('const_add_1_w', 'add_1_w'),
('add_1_w', 'add_1'),
('add_1', 'add_1_data'),
('add_1_data', 'fc_1'),
+ ('const_fc_1_w', 'fc_1_w'),
+ ('const_fc_1_b', 'fc_1_b'),
('fc_1_w', 'fc_1'),
('fc_1_b', 'fc_1'),
('fc_1', 'fc_1_data'),
+ ('fc_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 2048])},
'add_1_data': {'shape': np.array([1, 2048])},
+ 'const_add_1_w': {'shape': np.array([2048]), 'value': np.array([x for x in range(2048)])},
'add_1_w': {'shape': np.array([2048]), 'value': np.array([x for x in range(2048)])},
'fc_1': {'can_be_fused': False},
+ 'const_fc_1_w': {'shape': np.array([10260, 2048]), 'value': np.ones((10260, 2048))},
'fc_1_w': {'shape': np.array([10260, 2048]), 'value': np.ones((10260, 2048)),
'output_channel_dim': 0, 'input_channel_dim': 1,
'dims_number': 2},
+ 'const_fc_1_b': {'shape': np.array([10260]), 'value': np.ones(10260)},
'fc_1_b': {'shape': np.array([10260]), 'value': np.ones(10260)},
- 'fc_1_data': {'shape': np.array([1, 10260]), 'is_output': True},
+ 'fc_1_data': {'shape': np.array([1, 10260])},
})
_fuse_add(graph, Node(graph, 'add_1'), [Node(graph, 'fc_1')], backward=False)
graph = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'mul_1'),
+ ('const_mul_1_w', 'mul_1_w'),
('mul_1_w', 'mul_1'),
('mul_1', 'mul_1_data'),
('mul_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1', 'conv_1_data'),
('mul_1_data', 'conv_2'),
+ ('const_conv_2_w', 'conv_2_w'),
+ ('const_conv_2_b', 'conv_2_b'),
('conv_2_w', 'conv_2'),
('conv_2_b', 'conv_2'),
('conv_2', 'conv_2_data'),
('conv_1_data', 'concat_1'),
('conv_2_data', 'concat_1'),
- ('concat_1', 'concat_1_data')
+ ('concat_1', 'concat_1_data'),
+ ('concat_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
'mul_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_mul_1_w': {'shape': np.array([3]), 'value': np.array([1, 2, 3])},
'mul_1_w': {'shape': np.array([3]), 'value': np.array([1, 2, 3])},
+ 'const_conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96))},
'conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96)),
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_data': {'shape': np.array([1, 55, 55, 96])},
+ 'const_conv_2_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96))},
'conv_2_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96)),
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_2_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_2_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_2_data': {'shape': np.array([1, 55, 55, 96])},
- 'concat_1_data': {'is_output': True}
+ 'concat_1_data': {}
})
ref_weights = np.ones((11, 11, 3, 96)) * np.reshape(np.array([1, 2, 3]), (3, 1))
graph_ref = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1', 'conv_1_data'),
('placeholder_1_data', 'conv_2'),
+ ('const_conv_2_w', 'conv_2_w'),
+ ('const_conv_2_b', 'conv_2_b'),
('conv_2_w', 'conv_2'),
('conv_2_b', 'conv_2'),
('conv_2', 'conv_2_data'),
('conv_1_data', 'concat_1'),
('conv_2_data', 'concat_1'),
- ('concat_1', 'concat_1_data')
+ ('concat_1', 'concat_1_data'),
+ ('concat_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_conv_1_w': {'shape': ref_weights.shape, 'value': ref_weights},
'conv_1_w': {'shape': ref_weights.shape, 'value': ref_weights,
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_data': {'shape': np.array([1, 55, 55, 96])},
+ 'const_conv_2_w': {'shape': ref_weights.shape, 'value': ref_weights},
'conv_2_w': {'shape': ref_weights.shape, 'value': ref_weights,
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_2_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_2_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_2_data': {'shape': np.array([1, 55, 55, 96])},
})
graph = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'mul_1'),
+ ('const_mul_1_w', 'mul_1_w'),
('mul_1_w', 'mul_1'),
('mul_1', 'mul_1_data'),
('mul_1_data', 'fc_1'),
+ ('const_fc_1_w', 'fc_1_w'),
+ ('const_fc_1_b', 'fc_1_b'),
('fc_1_w', 'fc_1'),
('fc_1_b', 'fc_1'),
('fc_1', 'fc_1_data'),
+ ('fc_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 2048])},
'mul_1_data': {'shape': np.array([1, 2048])},
+ 'const_mul_1_w': {'shape': np.array([2048]), 'value': np.array([x for x in range(2048)])},
'mul_1_w': {'shape': np.array([2048]), 'value': np.array([x for x in range(2048)])},
+ 'const_fc_1_w': {'shape': np.array([10260, 2048]), 'value': np.ones((10260, 2048))},
'fc_1_w': {'shape': np.array([10260, 2048]), 'value': np.ones((10260, 2048)),
'output_channel_dim': 0, 'input_channel_dim': 1,
'dims_number': 2},
+ 'const_fc_1_b': {'shape': np.array([10260]), 'value': np.ones(10260)},
'fc_1_b': {'shape': np.array([10260]), 'value': np.ones(10260)},
- 'fc_1_data': {'shape': np.array([1, 10260]), 'is_output': True},
+ 'fc_1_data': {'shape': np.array([1, 10260])},
})
ref_weights = np.ones((10260, 2048)) * np.array([x for x in range(2048)])
graph_ref = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'fc_1'),
+ ('const_fc_1_w', 'fc_1_w'),
+ ('const_fc_1_b', 'fc_1_b'),
('fc_1_w', 'fc_1'),
('fc_1_b', 'fc_1'),
('fc_1', 'fc_1_data'),
+ ('fc_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 2048])},
+ 'const_fc_1_w': {'shape': ref_weights.shape, 'value': ref_weights},
'fc_1_w': {'shape': ref_weights.shape, 'value': ref_weights,
'output_channel_dim': 0, 'input_channel_dim': 1,
'dims_number': 2},
+ 'const_fc_1_b': {'shape': np.array([10260]), 'value': np.ones(10260)},
'fc_1_b': {'shape': np.array([10260]), 'value': np.ones(10260)},
- 'fc_1_data': {'shape': np.array([1, 10260]), 'is_output': True},
+ 'fc_1_data': {'shape': np.array([1, 10260])},
})
fuse_linear_ops(graph)
graph = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'fc_1'),
+ ('const_fc_1_w', 'fc_1_w'),
('fc_1_w', 'fc_1'),
('fc_1', 'fc_1_data'),
('fc_1_data', 'add_1'),
+ ('const_add_1_w', 'add_1_w'),
('add_1_w', 'add_1'),
('add_1', 'add_1_data'),
+ ('add_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 2048])},
- 'add_1_data': {'shape': np.array([1, 10260]), 'is_output': True},
+ 'add_1_data': {'shape': np.array([1, 10260])},
+ 'const_add_1_w': {'shape': np.array([1]), 'value': np.array([6]), 'data_type': None},
'add_1_w': {'shape': np.array([1]), 'value': np.array([6]), 'data_type': None},
+ 'const_fc_1_w': {'shape': np.array([10260, 2048]), 'value': np.ones((10260, 2048))},
'fc_1_w': {'shape': np.array([10260, 2048]), 'value': np.ones((10260, 2048)),
'output_channel_dim': 0, 'input_channel_dim': 1,
'dims_number': 2, 'data_type': None},
graph_ref = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'fc_1'),
+ ('const_fc_1_w', 'fc_1_w'),
+ ('const_fc_1_b', 'fc_1_b'),
('fc_1_w', 'fc_1'),
('fc_1_b', 'fc_1'),
('fc_1', 'fc_1_data'),
+ ('fc_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 2048])},
+ 'const_fc_1_w': {'shape': ref_weights.shape, 'value': ref_weights},
'fc_1_w': {'shape': ref_weights.shape, 'value': ref_weights,
'output_channel_dim': 0, 'input_channel_dim': 1,
'dims_number': 2},
+ 'const_fc_1_b': {'shape': ref_biases.shape, 'value': ref_biases},
'fc_1_b': {'shape': ref_biases.shape, 'value': ref_biases},
- 'fc_1_data': {'shape': np.array([1, 10260]), 'is_output': True},
+ 'fc_1_data': {'shape': np.array([1, 10260])},
})
fuse_linear_ops(graph)
graph = build_graph(nodes_attributes,
[('placeholder_1_data', 'conv_1'),
('conv_1', 'conv_1_data'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1_data', 'add_1'),
+ ('const_add_1_w', 'add_1_w'),
('add_1_w', 'add_1'),
('add_1', 'add_1_data'),
('concat_1', 'concat_1_data'),
+ ('const_mul_1_w', 'mul_1_w'),
('mul_1_w', 'mul_1'),
('mul_1', 'mul_1_data'),
('add_1_data', 'concat_1'),
('mul_1_data', 'concat_1'),
- ('add_1_data', 'mul_1')],
-
+ ('add_1_data', 'mul_1'),
+ ('concat_1_data', 'op_output')
+ ],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_conv_1_w': {'shape': np.array([1, 1, 3, 3]), 'value': np.zeros((1, 1, 3, 3))},
'conv_1_w': {'shape': np.array([1, 1, 3, 3]), 'value': np.zeros((1, 1, 3, 3)),
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_1_b': {'shape': np.array([3]), 'value': np.zeros(3)},
'conv_1_b': {'shape': np.array([3]), 'value': np.zeros(3)},
'conv_1_data': {'shape': np.array([1, 227, 227, 3])},
'mul_1_data': {'shape': np.array([1, 227, 227, 3])},
'add_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_mul_1_w': {'shape': np.array([1]), 'value': np.array([6])},
'mul_1_w': {'shape': np.array([1]), 'value': np.array([6])},
+ 'const_add_1_w': {'shape': np.array([1]), 'value': np.array([1])},
'add_1_w': {'shape': np.array([1]), 'value': np.array([1])},
- 'concat_1_data': {'is_output': True}
+ 'concat_1_data': {}
})
graph_ref = build_graph(nodes_attributes,
[('placeholder_1_data', 'conv_1'),
('conv_1', 'conv_1_data'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1_data', 'concat_1'),
+ ('const_mul_1_w', 'mul_1_w'),
('mul_1_w', 'mul_1'),
('conv_1_data', 'mul_1'),
('concat_1', 'concat_1_data'),
('mul_1', 'mul_1_data'),
- ('mul_1_data', 'concat_1')],
+ ('mul_1_data', 'concat_1'),
+ ('concat_1_data', 'op_output')
+ ],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_conv_1_w': {'shape': np.array([1, 1, 3, 3]), 'value': np.zeros((1, 1, 3, 3))},
'conv_1_w': {'shape': np.array([1, 1, 3, 3]), 'value': np.zeros((1, 1, 3, 3)),
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_1_b': {'shape': np.array([3]), 'value': np.ones(3)},
'conv_1_b': {'shape': np.array([3]), 'value': np.ones(3)},
'conv_1_data': {'shape': np.array([1, 227, 227, 3])},
'mul_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_mul_1_w': {'shape': np.array([1]), 'value': np.array([6])},
'mul_1_w': {'shape': np.array([1]), 'value': np.array([6])},
- 'concat_1_data': {'is_output': True}
+ 'concat_1_data': {}
})
fuse_linear_ops(graph)
graph = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'mul_1'),
+ ('const_mul_1_w', 'mul_1_w'),
('mul_1_w', 'mul_1'),
('mul_1', 'mul_1_data'),
('mul_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1', 'conv_1_data'),
('mul_1_data', 'conv_2'),
+ ('const_conv_2_w', 'conv_2_w'),
+ ('const_conv_2_b', 'conv_2_b'),
('conv_2_w', 'conv_2'),
('conv_2_b', 'conv_2'),
('conv_2', 'conv_2_data'),
('conv_1_data', 'concat_1'),
('conv_2_data', 'concat_1'),
- ('concat_1', 'concat_1_data')
+ ('concat_1', 'concat_1_data'),
+ ('concat_1_data', 'op_output')
+
],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
'mul_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_mul_1_w': {'shape': np.array([3]), 'value': np.array([1, 2, 3])},
'mul_1_w': {'shape': np.array([3]), 'value': np.array([1, 2, 3])},
+ 'const_conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96))},
'conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96)),
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_data': {'shape': np.array([1, 55, 55, 96])},
'conv_2': {'can_be_fused': False},
+ 'const_conv_2_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96))},
'conv_2_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96)),
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_2_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_2_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_2_data': {'shape': np.array([1, 55, 55, 96])},
- 'concat_1_data': {'is_output': True}
+ 'concat_1_data': {}
})
graph_ref = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'mul_1'),
+ ('const_mul_1_w', 'mul_1_w'),
('mul_1_w', 'mul_1'),
('mul_1', 'mul_1_data'),
('mul_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1', 'conv_1_data'),
('mul_1_data', 'conv_2'),
+ ('const_conv_2_w', 'conv_2_w'),
+ ('const_conv_2_b', 'conv_2_b'),
('conv_2_w', 'conv_2'),
('conv_2_b', 'conv_2'),
('conv_2', 'conv_2_data'),
('conv_1_data', 'concat_1'),
('conv_2_data', 'concat_1'),
- ('concat_1', 'concat_1_data')
+ ('concat_1', 'concat_1_data'),
+ ('concat_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
'mul_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_mul_1_w': {'shape': np.array([3]), 'value': np.array([1, 2, 3])},
'mul_1_w': {'shape': np.array([3]), 'value': np.array([1, 2, 3])},
+ 'const_conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96))},
'conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96)),
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_data': {'shape': np.array([1, 55, 55, 96])},
'conv_2': {'can_be_fused': False},
+ 'const_conv_2_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96))},
'conv_2_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96)),
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_2_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_2_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_2_data': {'shape': np.array([1, 55, 55, 96])},
- 'concat_1_data': {'is_output': True}
+ 'concat_1_data': {}
})
fuse_linear_ops(graph)
graph = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'mul_1'),
+ ('const_mul_1_w', 'mul_1_w'),
('mul_1_w', 'mul_1'),
('mul_1', 'mul_1_data'),
('mul_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1', 'conv_1_data'),
('mul_1_data', 'conv_2'),
+ ('const_conv_2_w', 'conv_2_w'),
+ ('const_conv_2_b', 'conv_2_b'),
('conv_2_w', 'conv_2'),
('conv_2_b', 'conv_2'),
('conv_2', 'conv_2_data'),
('conv_1_data', 'concat_1'),
('conv_2_data', 'concat_1'),
- ('concat_1', 'concat_1_data')
+ ('concat_1', 'concat_1_data'),
+ ('concat_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
'mul_1': {'can_be_fused': False},
'mul_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_mul_1_w': {'shape': np.array([3]), 'value': np.array([1, 2, 3])},
'mul_1_w': {'shape': np.array([3]), 'value': np.array([1, 2, 3])},
+ 'const_conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96))},
'conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96)),
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_data': {'shape': np.array([1, 55, 55, 96])},
+ 'const_conv_2_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96))},
'conv_2_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96)),
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_2_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_2_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_2_data': {'shape': np.array([1, 55, 55, 96])},
- 'concat_1_data': {'is_output': True}
+ 'concat_1_data': {}
})
graph_ref = build_graph(nodes_attributes,
[('placeholder_1', 'placeholder_1_data'),
('placeholder_1_data', 'mul_1'),
+ ('const_mul_1_w', 'mul_1_w'),
('mul_1_w', 'mul_1'),
('mul_1', 'mul_1_data'),
('mul_1_data', 'conv_1'),
+ ('const_conv_1_w', 'conv_1_w'),
+ ('const_conv_1_b', 'conv_1_b'),
('conv_1_w', 'conv_1'),
('conv_1_b', 'conv_1'),
('conv_1', 'conv_1_data'),
('mul_1_data', 'conv_2'),
+ ('const_conv_2_w', 'conv_2_w'),
+ ('const_conv_2_b', 'conv_2_b'),
('conv_2_w', 'conv_2'),
('conv_2_b', 'conv_2'),
('conv_2', 'conv_2_data'),
('conv_1_data', 'concat_1'),
('conv_2_data', 'concat_1'),
- ('concat_1', 'concat_1_data')
+ ('concat_1', 'concat_1_data'),
+ ('concat_1_data', 'op_output')
],
{'placeholder_1_data': {'shape': np.array([1, 227, 227, 3])},
'mul_1': {'can_be_fused': False},
'mul_1_data': {'shape': np.array([1, 227, 227, 3])},
+ 'const_mul_1_w': {'shape': np.array([3]), 'value': np.array([1, 2, 3])},
'mul_1_w': {'shape': np.array([3]), 'value': np.array([1, 2, 3])},
+ 'const_conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96))},
'conv_1_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96)),
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_1_data': {'shape': np.array([1, 55, 55, 96])},
+ 'const_conv_2_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96))},
'conv_2_w': {'shape': np.array([11, 11, 3, 96]), 'value': np.ones((11, 11, 3, 96)),
'output_channel_dim': 3, 'input_channel_dim': 2,
'dims_number': 4},
+ 'const_conv_2_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_2_b': {'shape': np.array([96]), 'value': np.zeros(96)},
'conv_2_data': {'shape': np.array([1, 55, 55, 96])},
- 'concat_1_data': {'is_output': True}
+ 'concat_1_data': {}
})
fuse_linear_ops(graph)