Package org.nd4j.linalg.factory
Class NDValidation
- java.lang.Object
-
- org.nd4j.linalg.factory.NDValidation
-
public class NDValidation extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisSameType(INDArray[] x)static booleanisSameType(INDArray x, INDArray y)static voidvalidateBool(String opName, String inputName, INDArray v)Validate that the operation is being applied on a boolean type INDArraystatic voidvalidateBool(String opName, INDArray v)Validate that the operation is being applied on a boolean type INDArraystatic voidvalidateBool(String opName, INDArray v1, INDArray v2)Validate that the operation is being applied on boolean INDArraysstatic voidvalidateFloatingPoint(String opName, String inputName, INDArray v)Validate that the operation is being applied on a floating point type INDArraystatic voidvalidateFloatingPoint(String opName, INDArray v)Validate that the operation is being applied on an floating point type INDArraystatic voidvalidateInteger(String opName, String inputName, INDArray v)Validate that the operation is being applied on an integer type INDArraystatic voidvalidateInteger(String opName, String inputName, INDArray[] v)Validate that the operation is being applied on an integer type INDArray []static voidvalidateInteger(String opName, INDArray v)Validate that the operation is being applied on an integer type INDArraystatic voidvalidateNumerical(String opName, String inputName, INDArray v)Validate that the operation is being applied on a numerical INDArray (not boolean or utf8).static voidvalidateNumerical(String opName, String inputName, INDArray[] v)Validate that the operation is being applied on numerical INDArrays (not boolean or utf8).static voidvalidateNumerical(String opName, INDArray v)Validate that the operation is being applied on a numerical INDArray (not boolean or utf8).static voidvalidateNumerical(String opName, INDArray[] v)Validate that the operation is being applied on numerical INDArrays (not boolean or utf8).static voidvalidateNumerical(String opName, INDArray v1, INDArray v2)Validate that the operation is being applied on numerical INDArrays (not boolean or utf8).static voidvalidateSameType(String opName, boolean numericalOnly, INDArray... vars)Validate that the operation is being applied on array with the exact same datatypes (which may optionally be restricted to numerical INDArrays only (not boolean or utf8))
-
-
-
Method Detail
-
validateNumerical
public static void validateNumerical(String opName, INDArray v)
Validate that the operation is being applied on a numerical INDArray (not boolean or utf8). Some operations (such as sum, norm2, add(Number) etc) don't make sense when applied to boolean/utf8 arrays- Parameters:
opName- Operation name to print in the exceptionv- Variable to perform operation on
-
validateNumerical
public static void validateNumerical(String opName, INDArray[] v)
Validate that the operation is being applied on numerical INDArrays (not boolean or utf8). Some operations (such as sum, norm2, add(Number) etc) don't make sense when applied to boolean/utf8 arrays- Parameters:
opName- Operation name to print in the exceptionv- Variable to perform operation on
-
validateNumerical
public static void validateNumerical(String opName, String inputName, INDArray v)
Validate that the operation is being applied on a numerical INDArray (not boolean or utf8). Some operations (such as sum, norm2, add(Number) etc) don't make sense when applied to boolean/utf8 arrays- Parameters:
opName- Operation name to print in the exceptionv- Variable to validate datatype for (input to operation)
-
validateNumerical
public static void validateNumerical(String opName, String inputName, INDArray[] v)
Validate that the operation is being applied on numerical INDArrays (not boolean or utf8). Some operations (such as sum, norm2, add(Number) etc) don't make sense when applied to boolean/utf8 arrays- Parameters:
opName- Operation name to print in the exceptionv- Variable to perform operation on
-
validateNumerical
public static void validateNumerical(String opName, INDArray v1, INDArray v2)
Validate that the operation is being applied on numerical INDArrays (not boolean or utf8). Some operations (such as sum, norm2, add(Number) etc don't make sense when applied to boolean/utf8 arrays- Parameters:
opName- Operation name to print in the exceptionv1- Variable to validate datatype for (input to operation)v2- Variable to validate datatype for (input to operation)
-
validateInteger
public static void validateInteger(String opName, INDArray v)
Validate that the operation is being applied on an integer type INDArray- Parameters:
opName- Operation name to print in the exceptionv- Variable to validate datatype for (input to operation)
-
validateInteger
public static void validateInteger(String opName, String inputName, INDArray v)
Validate that the operation is being applied on an integer type INDArray- Parameters:
opName- Operation name to print in the exceptioninputName- Name of the input to the op to validatev- Variable to validate datatype for (input to operation)
-
validateInteger
public static void validateInteger(String opName, String inputName, INDArray[] v)
Validate that the operation is being applied on an integer type INDArray []- Parameters:
opName- Operation name to print in the exceptioninputName- Name of the input to the op to validatev- Variable to validate datatype for (input to operation)
-
validateFloatingPoint
public static void validateFloatingPoint(String opName, INDArray v)
Validate that the operation is being applied on an floating point type INDArray- Parameters:
opName- Operation name to print in the exceptionv- Variable to validate datatype for (input to operation)
-
validateFloatingPoint
public static void validateFloatingPoint(String opName, String inputName, INDArray v)
Validate that the operation is being applied on a floating point type INDArray- Parameters:
opName- Operation name to print in the exceptioninputName- Name of the input to the op to validatev- Variable to validate datatype for (input to operation)
-
validateBool
public static void validateBool(String opName, INDArray v)
Validate that the operation is being applied on a boolean type INDArray- Parameters:
opName- Operation name to print in the exceptionv- Variable to validate datatype for (input to operation)
-
validateBool
public static void validateBool(String opName, String inputName, INDArray v)
Validate that the operation is being applied on a boolean type INDArray- Parameters:
opName- Operation name to print in the exceptioninputName- Name of the input to the op to validatev- Variable to validate datatype for (input to operation)
-
validateBool
public static void validateBool(String opName, INDArray v1, INDArray v2)
Validate that the operation is being applied on boolean INDArrays- Parameters:
opName- Operation name to print in the exceptionv1- Variable to validate datatype for (input to operation)v2- Variable to validate datatype for (input to operation)
-
validateSameType
public static void validateSameType(String opName, boolean numericalOnly, INDArray... vars)
Validate that the operation is being applied on array with the exact same datatypes (which may optionally be restricted to numerical INDArrays only (not boolean or utf8))- Parameters:
opName- Operation name to print in the exceptionnumericalOnly- If true, the variables must all be the same type, and must be numerical (not boolean/utf8)vars- Variable to perform operation on
-
isSameType
public static boolean isSameType(INDArray[] x)
-
-