- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi I am trying to fuse convolution and relu layer, but am running into issues. I think it is because of the way in which I am giving the apply_pattern. Could you kindly help fix the issue? I am doing this on a Resnet50 tensorflow .pb graph
I did this but I can see that this is not being matched as a proper subgraph in the main graph. In the pattern_match function, I can see matcher has an empty list
matcher = ism.MultiDiGraphMatcher(graph, subgraph, node_match, edge_match)
def convert_conv_relu_to_convrelu(graph: nx.MultiDiGraph): log.debug("Deepa") apply_pattern( graph, nodes=[ ('input', dict(kind='data')), ('weights', dict(kind='data')), ('bias', dict(kind='data')), ('convout', dict(kind='data')), ('output', dict(kind='data')), ('conv', dict(kind='op', op='Conv2D')), ('relu', dict(kind='op', op='Relu')) ], edges=[ ('weights', 'conv', {'in': 1}), ('bias','conv',{'in': 2}), ('input', 'conv', {'in': 0}), ('conv', 'convout'), ('convout', 'relu'), ('relu', 'output'), ], action=conv_relu_to_convrelu_action, node_attrs=['kind', 'op'], edge_attrs=['in'], )
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello deepa,
May I know your usage of OpenVINO? The conv & relu fusion can be implemented by inference engine. For instance, on CPU, the MKLDNNPlugin will call append_eltwise function to fuse conv & relu.
Best regards,
Fiona

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page