[GraphRegex] Any node type + ordered inputs / outputs
I propose to make the following improvments to GraphRegex:
- Add a
.
symbol to designate any node type, like.->Conv
; - Allow to specify the input/output index that must be matched, like
Producer-1>Conv
for input andProducer|0->Conv
for output.->
should probably default to input 0 / output 0. Any input / output may be matched usingProducer|*-*>Conv
for instance.
This would allow to make robust query like the following:
Pad?-0>Conv#->ReLU?;.-1>Conv#;.?-2>Conv#
or
Pad?->Conv#->ReLU?;(.-*>Conv#)*
- It works regardless of how the parameters are provided (it can be a
Producer
, or any other node type); - It works for optional inputs, like the bias;
- It ensures that we match the data input of
Conv
, and not another input.
Edited by Olivier BICHLER