Uses of Class
org.nd4j.autodiff.samediff.transform.SubGraphPredicate
-
Packages that use SubGraphPredicate Package Description org.nd4j.autodiff.samediff.transform -
-
Uses of SubGraphPredicate in org.nd4j.autodiff.samediff.transform
Methods in org.nd4j.autodiff.samediff.transform that return SubGraphPredicate Modifier and Type Method Description SubGraphPredicateSubGraphPredicate. withInputCount(int inputCount)Modify the current subgraph to match only if the function has the specified number of inputsSubGraphPredicateSubGraphPredicate. withInputMatching(int inputNum, @NonNull 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 SubGraphSubGraphPredicateSubGraphPredicate. withInputSubgraph(int inputNum, @NonNull 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 SubGraphSubGraphPredicateSubGraphPredicate. withOutputCount(int outputCount)Modify the current subgraph to match only if the function has the specified number of outputsstatic SubGraphPredicateSubGraphPredicate. withRoot(@NonNull OpPredicate root)Create a SubGraphPredicate with the specified root predicateMethods in org.nd4j.autodiff.samediff.transform with parameters of type SubGraphPredicate Modifier and Type Method Description static List<SubGraph>GraphTransformUtil. getSubgraphsMatching(SameDiff sd, SubGraphPredicate p)Get a list of all the subgraphs that match the specified predicatestatic SameDiffGraphTransformUtil. replaceSubgraphsMatching(@NonNull SameDiff sd, @NonNull SubGraphPredicate p, @NonNull 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.
-