public interface SubGraphProcessor
GraphTransformUtil
to define how a subgraph should be modified or replaced.
Note that when replacing a subgraph, the replacement subgraph must have the same number of outputs as the original subgraph.
Note that the order of the outputs matter.Modifier and Type | Method and Description |
---|---|
List<SDVariable> |
processSubgraph(SameDiff sd,
SubGraph subGraph)
Replace the subgraph, and return the new outputs that should replace the old outputs.
Note that the order of the outputs you return matters! If the original outputs are [A,B,C] and you return output variables [X,Y,Z], then anywhere "A" was used as input will now use "X"; similarly Y replaces B, and Z replaces C. |
List<SDVariable> processSubgraph(SameDiff sd, SubGraph subGraph)
sd
- SameDiff instancesubGraph
- Subgraph to modifyCopyright © 2019. All rights reserved.