Class OpPredicate
- java.lang.Object
-
- org.nd4j.autodiff.samediff.transform.OpPredicate
-
- Direct Known Subclasses:
SubGraphPredicate
public abstract class OpPredicate extends Object
-
-
Constructor Summary
Constructors Constructor Description OpPredicate()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static OpPredicate
classEquals(Class<?> c)
Return true if the operation class is equal to the specified classabstract boolean
matches(SameDiff sameDiff, DifferentialFunction function)
static OpPredicate
nameEquals(String name)
Return true if the operation own (user specified) name equals the specified namestatic OpPredicate
nameMatches(String regex)
Return true if the operation own (user specified) name matches the specified regular expressionstatic OpPredicate
opNameEquals(String opName)
Return true if the operation name (i.e., "add", "mul", etc - not the user specified name) equals the specified namestatic OpPredicate
opNameMatches(String regex)
Return true if the operation name (i.e., "add", "mul", etc - not the user specified name) matches the specified regular expression
-
-
-
Method Detail
-
matches
public abstract boolean matches(SameDiff sameDiff, DifferentialFunction function)
- Parameters:
sameDiff
- SameDiff instance the function belongs tofunction
-- Returns:
- Returns whether the specific function matches the predicate
-
nameEquals
public static OpPredicate nameEquals(String name)
Return true if the operation own (user specified) name equals the specified name
-
opNameEquals
public static OpPredicate opNameEquals(String opName)
Return true if the operation name (i.e., "add", "mul", etc - not the user specified name) equals the specified name
-
nameMatches
public static OpPredicate nameMatches(String regex)
Return true if the operation own (user specified) name matches the specified regular expression
-
opNameMatches
public static OpPredicate opNameMatches(String regex)
Return true if the operation name (i.e., "add", "mul", etc - not the user specified name) matches the specified regular expression
-
classEquals
public static OpPredicate classEquals(Class<?> c)
Return true if the operation class is equal to the specified class
-
-