Package | Description |
---|---|
org.nd4j.autodiff.samediff.transform |
Modifier and Type | Method and Description |
---|---|
SubGraphPredicate |
SubGraphPredicate.withInputCount(int inputCount)
Modify the current subgraph to match only if the function has the specified number of inputs
|
SubGraphPredicate |
SubGraphPredicate.withInputMatching(int inputNum,
OpPredicate opPredicate)
Require the subgraph to match the specified predicate for the specified input.
Note that this does NOT add the specified input to part of the subgraph i.e., the subgraph matches if the input matches the predicate, but when returning the SubGraph itself, the function for this input is not added to the SubGraph |
SubGraphPredicate |
SubGraphPredicate.withInputSubgraph(int inputNum,
OpPredicate opPredicate)
Require the subgraph to match the specified predicate for the specified input.
Note that this DOES add the specified input to part of the subgraph i.e., the subgraph matches if the input matches the predicate, and when returning the SubGraph itself, the function for this input IS added to the SubGraph |
SubGraphPredicate |
SubGraphPredicate.withOutputCount(int outputCount)
Modify the current subgraph to match only if the function has the specified number of outputs
|
static SubGraphPredicate |
SubGraphPredicate.withRoot(OpPredicate root)
Create a SubGraphPredicate with the specified root predicate
|
Modifier and Type | Method and Description |
---|---|
static List<SubGraph> |
GraphTransformUtil.getSubgraphsMatching(SameDiff sd,
SubGraphPredicate p)
Get a list of all the subgraphs that match the specified predicate
|
static SameDiff |
GraphTransformUtil.replaceSubgraphsMatching(SameDiff sd,
SubGraphPredicate p,
SubGraphProcessor processor)
Find all of the subgraphs that match the specified SubGraphPredicate and then replace them with a different subgraph.
Note that the original SameDiff instance is not modified; a copy is made, which is then modified and returned. |
Copyright © 2019. All rights reserved.