Uses of Interface
org.nd4j.linalg.api.ndarray.INDArray
-
-
Uses of INDArray in org.nd4j
Methods in org.nd4j that return types with arguments of type INDArray Modifier and Type Method Description Map<String,INDArray>TFGraphRunnerService. run(Map<String,INDArray> inputs)Method parameters in org.nd4j with type arguments of type INDArray Modifier and Type Method Description TFGraphRunnerServiceTFGraphRunnerService. init(List<String> inputNames, List<String> outputNames, byte[] graphBytes, Map<String,INDArray> constants, Map<String,String> inputDataTypes)Map<String,INDArray>TFGraphRunnerService. run(Map<String,INDArray> inputs) -
Uses of INDArray in org.nd4j.adapters
Methods in org.nd4j.adapters with parameters of type INDArray Modifier and Type Method Description TOutputAdapter. apply(INDArray... outputs)This method provides conversion from multiple INDArrays to T -
Uses of INDArray in org.nd4j.autodiff.execution.input
Methods in org.nd4j.autodiff.execution.input that return INDArray Modifier and Type Method Description INDArray[]Operands. asArray()This method return operands as array, in order of additionINDArrayOperands. getById(int id)This method returns array identified its numeric idINDArrayOperands. getById(int id, int index)This method returns array identified its numeric id and indexINDArrayOperands. getById(@NonNull String name)This method returns array identified its nameMethods in org.nd4j.autodiff.execution.input that return types with arguments of type INDArray Modifier and Type Method Description Collection<Pair<Operands.NodeDescriptor,INDArray>>Operands. asCollection()This method returns contents of this entity as collection of key->value pairsMethods in org.nd4j.autodiff.execution.input with parameters of type INDArray Modifier and Type Method Description OperandsOperands. addArgument(int id, int index, @NonNull INDArray array)This method allows to pass array to multi-output node in the graphOperandsOperands. addArgument(int id, @NonNull INDArray array)This method allows to pass array to the node identified by numeric idOperandsOperands. addArgument(@NonNull String id, @NonNull INDArray array)This method allows to pass array to the node identified by its nameOperandsOperands. addArgument(String name, int id, int index, @NonNull INDArray array)This method allows to pass array to multi-output node in the graph -
Uses of INDArray in org.nd4j.autodiff.functions
Fields in org.nd4j.autodiff.functions declared as INDArray Modifier and Type Field Description protected INDArrayDifferentialFunction. scalarValueMethods in org.nd4j.autodiff.functions that return INDArray Modifier and Type Method Description INDArrayDifferentialFunction. getInputArgument(int index) -
Uses of INDArray in org.nd4j.autodiff.listeners
Methods in org.nd4j.autodiff.listeners with parameters of type INDArray Modifier and Type Method Description voidBaseEvaluationListener. activationAvailable(SameDiff sd, At at, MultiDataSet batch, SameDiffOp op, String varName, INDArray activation)voidBaseListener. activationAvailable(SameDiff sd, At at, MultiDataSet batch, SameDiffOp op, String varName, INDArray activation)voidListener. activationAvailable(SameDiff sd, At at, MultiDataSet batch, SameDiffOp op, String varName, INDArray activation)Called when any activation becomes available.voidBaseEvaluationListener. activationAvailableEvaluations(SameDiff sd, At at, MultiDataSet batch, SameDiffOp op, String varName, INDArray activation)voidBaseListener. opExecution(SameDiff sd, At at, MultiDataSet batch, SameDiffOp op, OpContext opContext, INDArray[] outputs)voidListener. opExecution(SameDiff sd, At at, MultiDataSet batch, SameDiffOp op, OpContext opContext, INDArray[] outputs)Called at the end of each operation executionvoidBaseListener. preUpdate(SameDiff sd, At at, Variable v, INDArray update)voidListener. preUpdate(SameDiff sd, At at, Variable v, INDArray update)Called just before each parameter is to be updated - i.e., just before each parameter is modified. -
Uses of INDArray in org.nd4j.autodiff.listeners.debugging
Methods in org.nd4j.autodiff.listeners.debugging with parameters of type INDArray Modifier and Type Method Description voidArraySavingListener. opExecution(SameDiff sd, At at, MultiDataSet batch, SameDiffOp op, OpContext opContext, INDArray[] outputs)voidControlflowListener. opExecution(SameDiff sd, At at, MultiDataSet batch, SameDiffOp op, OpContext opContext, INDArray[] outputs)voidOpBenchmarkListener. opExecution(SameDiff sd, At at, MultiDataSet batch, SameDiffOp op, OpContext opContext, INDArray[] outputs) -
Uses of INDArray in org.nd4j.autodiff.listeners.impl
Methods in org.nd4j.autodiff.listeners.impl with parameters of type INDArray Modifier and Type Method Description voidUIListener. opExecution(SameDiff sd, At at, MultiDataSet batch, SameDiffOp op, OpContext opContext, INDArray[] outputs)voidUIListener. preUpdate(SameDiff sd, At at, Variable v, INDArray update) -
Uses of INDArray in org.nd4j.autodiff.listeners.profiler
Methods in org.nd4j.autodiff.listeners.profiler with parameters of type INDArray Modifier and Type Method Description voidProfilingListener. opExecution(SameDiff sd, At at, MultiDataSet batch, SameDiffOp op, OpContext opContext, INDArray[] outputs) -
Uses of INDArray in org.nd4j.autodiff.listeners.records
Constructors in org.nd4j.autodiff.listeners.records with parameters of type INDArray Constructor Description LossCurve(INDArray lossValues, List<String> lossNames) -
Uses of INDArray in org.nd4j.autodiff.samediff
Methods in org.nd4j.autodiff.samediff that return INDArray Modifier and Type Method Description INDArraySDVariable. eval()Evaluate the result of this variableINDArraySDVariable. eval(Map<String,INDArray> placeholders)Evaluate the result of this variableINDArraySDVariable. getArr()A getter for the allocated ndarray with thisSDVariable.INDArraySDVariable. getArr(boolean enforceExistence)A getter for the allocated ndarray with thisSDVariable.INDArrayArrayHolder. getArray(String name)INDArraySameDiff. getArrForVarName(@NonNull String varName)Get anINDArrayfor a given vertex id, or null if none existsINDArraySameDiff. getEagerArrForVarName(@NonNull String varName)Note this is a special getter for the eager holder.INDArraySameDiff. itemForSequence(String varName, int atIndex)Get theINDArrayat a particular sequence.INDArraySameDiff. outputSingle(Map<String,INDArray> placeholders, String output)Do inference for a single variable for a single batch.INDArrayArrayHolder. removeArray(String name)Remove the array from the ArrayHolder, returning it (if it exists)Methods in org.nd4j.autodiff.samediff that return types with arguments of type INDArray Modifier and Type Method Description Map<String,INDArray>SameDiff. calculateGradients(Map<String,INDArray> placeholderVals, @NonNull String... variables)Map<String,INDArray>SameDiff. calculateGradients(Map<String,INDArray> placeholderVals, @NonNull Collection<String> variables)Calculate and return the gradients for the specified variablesMap<String,INDArray>SameDiff. output(@NonNull DataSetIterator dataSet, @NonNull String... outputs)Map<String,INDArray>SameDiff. output(@NonNull DataSetIterator iterator, @NonNull List<Listener> listeners, @NonNull String... outputs)Do inference on a network with a single input.
For example, if the variable to infer was called "softmax" you would use:Map<String,INDArray>SameDiff. output(@NonNull MultiDataSetIterator dataSet, @NonNull String... outputs)Map<String,INDArray>SameDiff. output(@NonNull MultiDataSetIterator iterator, @NonNull List<Listener> listeners, @NonNull String... outputs)Perform inference.
Example: classifier inference
Predictions variable name: "softmaxOutput"
Evaluations to perform:Evaluation
Data: single output MultiDataSets
Code:Map<String,INDArray>SameDiff. output(@NonNull MultiDataSet dataSet, @NonNull String... outputs)Do a single batch inference on a network.
For example, if the variable to infer was called "softmax" you would use:Map<String,INDArray>SameDiff. output(@NonNull DataSet dataSet, @NonNull String... outputs)Do a single batch inference on a network with a single input.
For example, if the variable to infer was called "softmax" you would use:Map<String,INDArray>SameDiff. output(Map<String,INDArray> placeholders, @NonNull List<String> outputs)Do inference for the given variables for a single batch.Map<String,INDArray>SameDiff. output(Map<String,INDArray> placeholders, String... outputs)Do inference for the given variables for a single batch.Map<String,INDArray>SameDiff. output(Map<String,INDArray> placeholders, List<Listener> listeners, String... outputs)Do inference for the given variables for a single batch.Map<String,INDArray>SameDiff. outputAll(Map<String,INDArray> placeholders)Do inference for all variables for a single batch.List<Map<String,INDArray>>SameDiff. outputBatches(DataSetIterator iterator, String... outputs)SeeSameDiff.output(DataSetIterator, String...), but without the concatenation of batches.List<Map<String,INDArray>>SameDiff. outputBatches(DataSetIterator iterator, List<Listener> listeners, String... outputs)SeeSameDiff.output(DataSetIterator, List, String...), but without the concatenation of batches.List<Map<String,INDArray>>SameDiff. outputBatches(MultiDataSetIterator iterator, String... outputs)List<Map<String,INDArray>>SameDiff. outputBatches(MultiDataSetIterator iterator, List<Listener> listeners, String... outputs)Perform inference.
Example: classifier inference
Predictions variable name: "softmaxOutput"
Evaluations to perform:Evaluation
Data: single output MultiDataSets
Code:Methods in org.nd4j.autodiff.samediff with parameters of type INDArray Modifier and Type Method Description voidSameDiff. addItemToSequence(String varName, INDArray item, int atIndex)Add an item to the sequencevoidSameDiff. assignArray(@NonNull INDArray arr, @NonNull SDVariable variable)Update the constant or variable type SDVariable with the values from the specified array.voidSameDiff. associateArrayWithVariable(INDArray arr, @NonNull String variable)Associate the array with the given variable.voidSameDiff. associateArrayWithVariable(INDArray arr, SDVariable variable)Associate the array with the given variable.SDVariableSameDiff. constant(@NonNull INDArray constant)Create an SDVariable with a fixed/constant value, with a generated name
Constants are not modified by training/backprop.SDVariableSameDiff. constant(String name, @NonNull INDArray constant)Create an SDVariable with a fixed/constant value
Constants are not modified by training/backprop.SDVariableSameDiff. createSequence(String name, INDArray[] arrays)Creates a sequence variable based on the input arrays.SDVariableSameDiff. createSequence(INDArray[] arrays)Create a new sequence variable usingSameDiff.createSequence(String, INDArray[])voidArrayHolder. setArray(String name, INDArray array)Set the array for the specified name (new array, or replace if it already exists)SDVariableSDVariable. setArray(INDArray array)Associate the specified array with this variablevoidSameDiff. setArrayForVariable(@NonNull String varName, @NonNull INDArray arr)Set the storedINDArrayfor a variable.voidSameDiff. setEagerArrForVarName(@NonNull String varName, INDArray arr)Sets an array for the given variable name in the eager session.voidSameDiff. setItemForSequenceAtIndex(String varName, INDArray item, int index)Sets the item at the particular index in the sequence to the passed in item.SDVariableSameDiff. var(String name, @NonNull INDArray arr)Create anSDVariablewith the specified name, and associate the specified array with it
This is a VARIABLE type SDVariable - i.e., must be floating point, and is a trainable parameter.SDVariableSameDiff. var(INDArray arr)Create anSDVariablewith a generated name, and assocate the specified array with it.
This is a VARIABLE type SDVariable - i.e., must be floating point, and is a trainable parameter.Method parameters in org.nd4j.autodiff.samediff with type arguments of type INDArray Modifier and Type Method Description protected ExecutionResultSameDiff. batchOutputHelper(Map<String,INDArray> placeholders, List<Listener> listeners, Operation operation, String... outputs)protected ExecutionResultSameDiff. batchOutputHelper(Map<String,INDArray> placeholders, Map<String,SDValue> otherPlaceholders, List<Listener> listeners, Operation operation, String... outputs)Map<String,INDArray>SameDiff. calculateGradients(Map<String,INDArray> placeholderVals, @NonNull String... variables)Map<String,INDArray>SameDiff. calculateGradients(Map<String,INDArray> placeholderVals, @NonNull Collection<String> variables)Calculate and return the gradients for the specified variablesOutAndGradSameDiff. calculateGradientsAndOutputs(Map<String,INDArray> placeholderVals, Collection<String> outputVars, Collection<String> gradientVars)Calculate the activations and the gradients for the specified variables, in one execution call.SDVariable[]SameDiffFunctionDefinition. define(SameDiff sameDiff, Map<String,INDArray> inputs, SDVariable[] variableInputs)voidSameDiff. defineFunction(String function, SameDiffFunctionDefinition functionDefinition, Map<String,INDArray> inputs)protected ExecutionResultSameDiff. directExecHelper(Map<String,INDArray> placeholders, Map<String,SDValue> otherPlaceHolders, At at, MultiDataSet batch, Collection<String> requiredActivations, List<Listener> activeListeners, String... outputs)Do inference for the given variables for a single batch, with training informationprotected ExecutionResultSameDiff. directExecHelper(Map<String,INDArray> placeholders, At at, MultiDataSet batch, Collection<String> requiredActivations, List<Listener> activeListeners, String... outputs)Do inference for the given variables for a single batch, with training informationINDArraySDVariable. eval(Map<String,INDArray> placeholders)Evaluate the result of this variableMap<String,INDArray>SameDiff. output(Map<String,INDArray> placeholders, @NonNull List<String> outputs)Do inference for the given variables for a single batch.Map<String,INDArray>SameDiff. output(Map<String,INDArray> placeholders, String... outputs)Do inference for the given variables for a single batch.Map<String,INDArray>SameDiff. output(Map<String,INDArray> placeholders, List<Listener> listeners, String... outputs)Do inference for the given variables for a single batch.ExecutionResultSameDiff. output(Map<String,INDArray> placeholders, Map<String,SDValue> sequencePlaceHolders, List<Listener> listeners, String... outputs)Do inference for the given variables for a single batch.Map<String,INDArray>SameDiff. outputAll(Map<String,INDArray> placeholders)Do inference for all variables for a single batch.INDArraySameDiff. outputSingle(Map<String,INDArray> placeholders, String output)Do inference for a single variable for a single batch. -
Uses of INDArray in org.nd4j.autodiff.samediff.array
Methods in org.nd4j.autodiff.samediff.array that return INDArray Modifier and Type Method Description INDArrayOptimizedGraphArrayHolder. getArray(String name)INDArraySingleThreadArrayHolder. getArray(@NonNull String name)INDArrayThreadSafeArrayHolder. getArray(@NonNull String name)INDArrayOptimizedGraphArrayHolder. removeArray(String name)INDArraySingleThreadArrayHolder. removeArray(@NonNull String name)INDArrayThreadSafeArrayHolder. removeArray(@NonNull String name)Methods in org.nd4j.autodiff.samediff.array with parameters of type INDArray Modifier and Type Method Description voidOptimizedGraphArrayHolder. setArray(String name, INDArray array)voidSingleThreadArrayHolder. setArray(@NonNull String name, @NonNull INDArray array)voidThreadSafeArrayHolder. setArray(@NonNull String name, @NonNull INDArray array)Method parameters in org.nd4j.autodiff.samediff.array with type arguments of type INDArray Modifier and Type Method Description voidOptimizedGraphArrayHolder. setFunction(String name, Supplier<INDArray> fn) -
Uses of INDArray in org.nd4j.autodiff.samediff.config
Methods in org.nd4j.autodiff.samediff.config that return INDArray Modifier and Type Method Description INDArrayBatchOutputConfig. execSingle()Deprecated.INDArrayOutputConfig. execSingle()Do inference and return the results for the single output variable specified.INDArraySDValue. getTensorValue()Return anINDArrayif the value type isSDValueType.LISTand the number of elements is 1 otherwise return theSDValue.tensorValueINDArrayBatchOutputConfig. outputSingle()Do inference and return the results for the single output Only works if exactly one output is specifiedINDArray[]ExecutionResult. outputsToArray(List<String> inputs)INDArrayExecutionResult. resultAt(int index)INDArrayExecutionResult. resultOrValueAt(int index, boolean returnDummy)Methods in org.nd4j.autodiff.samediff.config that return types with arguments of type INDArray Modifier and Type Method Description Map<String,INDArray>BatchOutputConfig. exec()Deprecated.Map<String,INDArray>OutputConfig. exec()Do inference and return the results.List<Map<String,INDArray>>OutputConfig. execBatches()Do inference and return the results in batches.List<INDArray>OutputConfig. execSingleBatches()Do inference and return the results (in batches) for the single output variable specified.Collection<INDArray>SDValue. getCollection()List<INDArray>SDValue. getListValue()Return anINDArrayif the value type isSDValueType.TENSORelse return the list typeMap<String,INDArray>BatchOutputConfig. output()Do inference and return the resultsstatic Map<String,Optional<INDArray>>ExecutionResult. pack(Map<String,INDArray> result)static Map<String,INDArray>ExecutionResult. unpack(Map<String,Optional<INDArray>> result)Methods in org.nd4j.autodiff.samediff.config with parameters of type INDArray Modifier and Type Method Description static SDValueSDValue. create(INDArray inputValue)Wrap anINDArrayin a tensor with anSDValueType.TENSORtypestatic ExecutionResultExecutionResult. createFrom(String name, INDArray input)static ExecutionResultExecutionResult. createFrom(List<String> names, INDArray[] input)BatchOutputConfigBatchOutputConfig. input(@NonNull String variable, @NonNull INDArray placeholder)Add a placeholder value for a specified variableBatchOutputConfigBatchOutputConfig. input(@NonNull SDVariable variable, @NonNull INDArray placeholder)Method parameters in org.nd4j.autodiff.samediff.config with type arguments of type INDArray Modifier and Type Method Description static SDValueSDValue. create(Collection<INDArray> inputValue)Wrap anINDArrayin a value with anSDValueType.LISTtypestatic SDValueSDValue. create(List<INDArray> inputValue)Wrap anINDArrayin a value with anSDValueType.LISTtypestatic SDValueSDValue. create(Map<String,INDArray> inputValue)Wrap an {@link Map} in a value with an SDValueType.DICTtypeBatchOutputConfigBatchOutputConfig. inputs(Map<String,INDArray> placeholders)CallsBatchOutputConfig.input(String, INDArray)on each entry in the map.static Map<String,Optional<INDArray>>ExecutionResult. pack(Map<String,INDArray> result)static Map<String,INDArray>ExecutionResult. unpack(Map<String,Optional<INDArray>> result) -
Uses of INDArray in org.nd4j.autodiff.samediff.internal
Methods in org.nd4j.autodiff.samediff.internal that return INDArray Modifier and Type Method Description INDArraySessionMemMgr. allocate(boolean detached, DataType dataType, long... shape)Allocate an array with the specified datatype and shape.
NOTE: This array should be assumed to be uninitialized - i.e., contains random values.INDArraySessionMemMgr. allocate(boolean detached, LongShapeDescriptor descriptor)As perSessionMemMgr.allocate(boolean, DataType, long...)but from a LongShapeDescriptor insteadINDArraySessionMemMgr. dup(INDArray arr)Duplicate the specified array, to an array that is managed/allocated by the session memory managerprotected INDArrayInferenceSession. getArray(SDVariable sdv, Collection<AbstractSession.VarId> opInputs, Collection<AbstractSession.VarId> allIterInputs)INDArrayInferenceSession. getConstantOrVariable(String variableName)protected INDArrayAbstractSession. getTensorFromOutputs(AbstractSession.VarId varId)INDArraySessionMemMgr. ulike(INDArray arr)Allocate an uninitialized array with the same datatype and shape as the specified arrayMethods in org.nd4j.autodiff.samediff.internal that return types with arguments of type INDArray Modifier and Type Method Description List<INDArray>AbstractSession. getTensorArraysInSession(String name)Get theINDArrayassociated with the given variable nameList<INDArray>AbstractSession. getTensorArraysInSession(String name, String frame, int iteration, FrameIter parentFrame)Get theINDArrayassociated with the given variable nameprotected Map<String,INDArray>InferenceSession. postProcessOutput(Map<String,INDArray> output)protected Map<String,INDArray>InferenceSession. preprocessPlaceholders(Map<String,INDArray> placeholders, At at)Methods in org.nd4j.autodiff.samediff.internal with parameters of type INDArray Modifier and Type Method Description INDArraySessionMemMgr. dup(INDArray arr)Duplicate the specified array, to an array that is managed/allocated by the session memory managervoidSessionMemMgr. release(INDArray array)Release the array.protected voidAbstractSession. setArrayAtIndex(List<INDArray> l, int i, INDArray sub)INDArraySessionMemMgr. ulike(INDArray arr)Allocate an uninitialized array with the same datatype and shape as the specified arrayMethod parameters in org.nd4j.autodiff.samediff.internal with type arguments of type INDArray Modifier and Type Method Description Pair<SameDiffOp,OpContext>InferenceSession. getAndParameterizeOp(String opName, FrameIter frameIter, Set<AbstractSession.VarId> opInputs, Set<AbstractSession.VarId> allIterInputs, Set<String> constAndPhInputs, Map<String,INDArray> placeholderValues, Set<String> allReqVariables, Map<String,SDValue> otherPlaceholders)protected Map<String,INDArray>InferenceSession. postProcessOutput(Map<String,INDArray> output)protected Map<String,INDArray>InferenceSession. preprocessPlaceholders(Map<String,INDArray> placeholders, At at)protected voidAbstractSession. setArrayAtIndex(List<INDArray> l, int i, INDArray sub)LossTrainingSession. trainingIteration(TrainingConfig config, Map<String,INDArray> placeholders, Set<String> paramsToTrain, Map<String,GradientUpdater> updaters, MultiDataSet batch, List<String> lossVariables, List<Listener> listeners, At at)Perform one iteration of training - i.e., do forward and backward passes, and update the parameters -
Uses of INDArray in org.nd4j.autodiff.samediff.internal.memory
Classes in org.nd4j.autodiff.samediff.internal.memory with type parameters of type INDArray Modifier and Type Class Description classDependencyMap<K extends IDependeeGroup<INDArray>,V>Methods in org.nd4j.autodiff.samediff.internal.memory that return INDArray Modifier and Type Method Description INDArrayArrayCacheMemoryMgr. allocate(boolean detached, DataType dataType, long... shape)INDArrayArrayCacheMemoryMgr. allocate(boolean detached, LongShapeDescriptor descriptor)INDArrayNoOpMemoryMgr. allocate(boolean detached, DataType dataType, long... shape)INDArrayNoOpMemoryMgr. allocate(boolean detached, LongShapeDescriptor descriptor)INDArrayAbstractMemoryMgr. dup(@NonNull INDArray arr)INDArrayAbstractMemoryMgr. ulike(@NonNull INDArray arr)Methods in org.nd4j.autodiff.samediff.internal.memory with parameters of type INDArray Modifier and Type Method Description INDArrayAbstractMemoryMgr. dup(@NonNull INDArray arr)voidArrayCacheMemoryMgr. release(@NonNull INDArray array)voidNoOpMemoryMgr. release(@NonNull INDArray array)INDArrayAbstractMemoryMgr. ulike(@NonNull INDArray arr) -
Uses of INDArray in org.nd4j.autodiff.samediff.optimize
Method parameters in org.nd4j.autodiff.samediff.optimize with type arguments of type INDArray Modifier and Type Method Description OptimizationHelperOptimizationHelper. arrayRecoveryFunction(String arrayName, Supplier<INDArray> fn) -
Uses of INDArray in org.nd4j.autodiff.util
Methods in org.nd4j.autodiff.util that return types with arguments of type INDArray Modifier and Type Method Description static List<INDArray>SameDiffUtils. getSingleOutput(List<Map<String,INDArray>> outputs, String output)Get a list of batch outputs for a single variable from a list of batch outputs for all variablesstatic List<INDArray>TrainingUtils. getSingleOutput(List<Map<String,INDArray>> outputs, String output)Get a list of batch outputs for a single variable from a list of batch outputs for all variablesstatic Map<String,INDArray>SameDiffUtils. stackOutputs(List<ExecutionResult> outputs)Stack batch outputs, like an output fromSameDiff.output(MultiDataSetIterator, String...)static Map<String,INDArray>TrainingUtils. stackOutputs(List<Map<String,INDArray>> outputs)Stack batch outputs, like an output fromSameDiff.output(MultiDataSetIterator, String...)Method parameters in org.nd4j.autodiff.util with type arguments of type INDArray Modifier and Type Method Description static ExternalErrorsFunctionSameDiffUtils. externalErrors(SameDiff sameDiff, Map<String,INDArray> externalGradients, SDVariable... inputs)static List<INDArray>SameDiffUtils. getSingleOutput(List<Map<String,INDArray>> outputs, String output)Get a list of batch outputs for a single variable from a list of batch outputs for all variablesstatic List<INDArray>TrainingUtils. getSingleOutput(List<Map<String,INDArray>> outputs, String output)Get a list of batch outputs for a single variable from a list of batch outputs for all variablesstatic Map<String,INDArray>TrainingUtils. stackOutputs(List<Map<String,INDArray>> outputs)Stack batch outputs, like an output fromSameDiff.output(MultiDataSetIterator, String...) -
Uses of INDArray in org.nd4j.autodiff.validation
Methods in org.nd4j.autodiff.validation that return types with arguments of type INDArray Modifier and Type Method Description Map<String,INDArray>TestCase. gradCheckMask()Methods in org.nd4j.autodiff.validation with parameters of type INDArray Modifier and Type Method Description TestCaseTestCase. expected(@NonNull String name, @NonNull INDArray output)Validate the output (forward pass) for a single variable using INDArray.equals(INDArray)TestCaseTestCase. expected(@NonNull SDVariable var, @NonNull INDArray output)Validate the output (forward pass) for a single variable using INDArray.equals(INDArray)OpTestCaseOpTestCase. expectedOutput(int outputNum, INDArray expected)Validate the op output using INDArray.equals(INDArray)OpTestCaseOpTestCase. expectedOutput(int outputNum, INDArray expected, double eps)Validate the op output using INDArray.equals(INDArray)TestCaseTestCase. expectedOutput(@NonNull String name, @NonNull INDArray expected)Validate the output (forward pass) for a single variable using INDArray.equals(INDArray)TestCaseTestCase. expectedOutput(@NonNull String name, @NonNull INDArray expected, double eps)Validate the output (forward pass) for a single variable using INDArray.equals(INDArray)OpTestCaseOpTestCase. expectedOutputRelError(int outputNum, @NonNull INDArray expected, double maxRelError, double minAbsError)Validate the output for a single variable using element-wise relative error: relError = abs(x-y)/(abs(x)+abs(y)), with x=y=0 case defined to be 0.0.TestCaseTestCase. expectedOutputRelError(@NonNull String name, @NonNull INDArray expected, double maxRelError, double minAbsError)Validate the output (forward pass) for a single variable using element-wise relative error: relError = abs(x-y)/(abs(x)+abs(y)), with x=y=0 case defined to be 0.0.voidActivationGradientCheckListener. opExecution(SameDiff sd, At at, MultiDataSet batch, SameDiffOp op, OpContext opContext, INDArray[] outputs)TestCaseTestCase. placeholderValue(String variable, INDArray value)Method parameters in org.nd4j.autodiff.validation with type arguments of type INDArray Modifier and Type Method Description static booleanGradCheckUtil. checkGradients(SameDiff sd, Map<String,INDArray> placeholderValues, boolean print, boolean exitOnFirstFailure)static booleanGradCheckUtil. checkGradients(SameDiff sd, Map<String,INDArray> placeholderValues, double eps, double maxRelError, double minAbsError, boolean print, boolean exitOnFirstFailure)static booleanGradCheckUtil. checkGradients(SameDiff sd, Map<String,INDArray> placeholderValues, double eps, double maxRelError, double minAbsError, boolean print, boolean exitOnFirstFailure, boolean skipValidation, boolean debugMode, Set<String> skipVariables, Map<String,INDArray> gradCheckMask)static booleanGradCheckUtil. checkGradients(SameDiff sd, Map<String,INDArray> placeholderValues, double eps, double maxRelError, double minAbsError, boolean print, boolean exitOnFirstFailure, boolean skipValidation, boolean debugMode, Set<String> skipVariables, Map<String,INDArray> gradCheckMask, int maxPerParam, GradCheckUtil.Subset subset)static booleanGradCheckUtil. checkGradients(SameDiff sd, Map<String,INDArray> placeholderValues, String... skipVariables)TestCaseTestCase. expected(String name, Function<INDArray,String> validationFn)TestCaseTestCase. expected(SDVariable var, Function<INDArray,String> validationFn)OpTestCaseOpTestCase. expectedOutput(int outputNum, @NonNull LongShapeDescriptor expShape, @NonNull Function<INDArray,String> validationFn)TestCaseTestCase. placeholderValues(Map<String,INDArray> placeholderValues) -
Uses of INDArray in org.nd4j.autodiff.validation.functions
Methods in org.nd4j.autodiff.validation.functions with parameters of type INDArray Modifier and Type Method Description StringEqualityFn. apply(INDArray actual)StringRelErrorFn. apply(INDArray actual) -
Uses of INDArray in org.nd4j.evaluation
Methods in org.nd4j.evaluation that return INDArray Modifier and Type Method Description static INDArrayEvaluationUtils. reshapeTimeSeriesMaskToVector(INDArray timeSeriesMask)Reshape time series mask arrays.static INDArrayEvaluationUtils. reshapeTimeSeriesTo2d(INDArray labels)Methods in org.nd4j.evaluation that return types with arguments of type INDArray Modifier and Type Method Description static Pair<INDArray,INDArray>EvaluationUtils. extractNonMaskedTimeSteps(INDArray labels, INDArray predicted, INDArray outputMask)static Pair<INDArray,INDArray>EvaluationUtils. extractNonMaskedTimeSteps(INDArray labels, INDArray predicted, INDArray outputMask)static Triple<INDArray,INDArray,INDArray>BaseEvaluation. reshapeAndExtractNotMasked(INDArray labels, INDArray predictions, INDArray mask, int axis)static Triple<INDArray,INDArray,INDArray>BaseEvaluation. reshapeAndExtractNotMasked(INDArray labels, INDArray predictions, INDArray mask, int axis)static Triple<INDArray,INDArray,INDArray>BaseEvaluation. reshapeAndExtractNotMasked(INDArray labels, INDArray predictions, INDArray mask, int axis)Methods in org.nd4j.evaluation with parameters of type INDArray Modifier and Type Method Description voidBaseEvaluation. eval(@NonNull INDArray labels, @NonNull INDArray predictions, List<? extends Serializable> recordMetaData)voidBaseEvaluation. eval(INDArray labels, INDArray networkPredictions)voidBaseEvaluation. eval(INDArray labels, INDArray networkPredictions, INDArray maskArray)voidIEvaluation. eval(INDArray labels, INDArray networkPredictions)voidIEvaluation. eval(INDArray labels, INDArray networkPredictions, List<? extends Serializable> recordMetaData)voidIEvaluation. eval(INDArray labels, INDArray networkPredictions, INDArray maskArray)voidIEvaluation. eval(INDArray labels, INDArray networkPredictions, INDArray maskArray, List<? extends Serializable> recordMetaData)voidBaseEvaluation. evalTimeSeries(INDArray labels, INDArray predicted)voidBaseEvaluation. evalTimeSeries(INDArray labels, INDArray predictions, INDArray labelsMask)voidIEvaluation. evalTimeSeries(INDArray labels, INDArray predicted)Deprecated.voidIEvaluation. evalTimeSeries(INDArray labels, INDArray predicted, INDArray labelsMaskArray)Deprecated.static Pair<INDArray,INDArray>EvaluationUtils. extractNonMaskedTimeSteps(INDArray labels, INDArray predicted, INDArray outputMask)static Triple<INDArray,INDArray,INDArray>BaseEvaluation. reshapeAndExtractNotMasked(INDArray labels, INDArray predictions, INDArray mask, int axis)static INDArrayEvaluationUtils. reshapeTimeSeriesMaskToVector(INDArray timeSeriesMask)Reshape time series mask arrays.static INDArrayEvaluationUtils. reshapeTimeSeriesTo2d(INDArray labels) -
Uses of INDArray in org.nd4j.evaluation.classification
Fields in org.nd4j.evaluation.classification declared as INDArray Modifier and Type Field Description protected INDArrayEvaluation. costArrayMethods in org.nd4j.evaluation.classification that return INDArray Modifier and Type Method Description protected INDArrayROC. getProbAndLabelUsed()Methods in org.nd4j.evaluation.classification with parameters of type INDArray Modifier and Type Method Description voidEvaluation. eval(INDArray realOutcomes, INDArray guesses)Collects statistics on the real outcomes vs the guesses.voidEvaluation. eval(INDArray labels, INDArray predictions, INDArray mask, List<? extends Serializable> recordMetaData)Evaluate the network, with optional metadatavoidEvaluationBinary. eval(INDArray labels, INDArray networkPredictions)voidEvaluationBinary. eval(INDArray labelsArr, INDArray predictionsArr, INDArray maskArr)voidEvaluationBinary. eval(INDArray labels, INDArray networkPredictions, INDArray maskArray, List<? extends Serializable> recordMetaData)voidEvaluationCalibration. eval(INDArray labels, INDArray networkPredictions)voidEvaluationCalibration. eval(INDArray labels, INDArray predictions, INDArray mask)voidEvaluationCalibration. eval(INDArray labels, INDArray networkPredictions, INDArray maskArray, List<? extends Serializable> recordMetaData)voidROC. eval(INDArray labels, INDArray predictions, INDArray mask, List<? extends Serializable> recordMetaData)Evaluate (collect statistics for) the given minibatch of data.voidROCBinary. eval(INDArray labels, INDArray predictions, INDArray mask, List<? extends Serializable> recordMetaData)voidROCMultiClass. eval(INDArray labels, INDArray predictions, INDArray mask, List<? extends Serializable> recordMetaData)Evaluate the network, with optional metadataConstructors in org.nd4j.evaluation.classification with parameters of type INDArray Constructor Description Evaluation(int axis, Integer binaryPositiveClass, int topN, List<String> labelsList, Double binaryDecisionThreshold, INDArray costArray, int maxWarningClassesToPrint)Evaluation(List<String> labels, INDArray costArray)Created evaluation instance with the specified cost array.Evaluation(INDArray costArray)Created evaluation instance with the specified cost array.EvaluationBinary(int axis, ROCBinary rocBinary, List<String> labels, INDArray decisionThreshold)EvaluationBinary(INDArray decisionThreshold)Create an EvaulationBinary instance with an optional decision threshold array. -
Uses of INDArray in org.nd4j.evaluation.custom
Methods in org.nd4j.evaluation.custom with parameters of type INDArray Modifier and Type Method Description voidCustomEvaluation. eval(INDArray labels, INDArray networkPredictions, INDArray maskArray, List<? extends Serializable> recordMetaData)TEvaluationLambda. eval(INDArray labels, INDArray networkPredictions, INDArray maskArray, List<? extends Serializable> recordMetaData) -
Uses of INDArray in org.nd4j.evaluation.regression
Methods in org.nd4j.evaluation.regression with parameters of type INDArray Modifier and Type Method Description voidRegressionEvaluation. eval(INDArray labels, INDArray predictions)voidRegressionEvaluation. eval(INDArray labelsArr, INDArray predictionsArr, INDArray maskArr)voidRegressionEvaluation. eval(INDArray labels, INDArray networkPredictions, INDArray maskArray, List<? extends Serializable> recordMetaData) -
Uses of INDArray in org.nd4j.graph.ui
Methods in org.nd4j.graph.ui with parameters of type INDArray Modifier and Type Method Description longLogFileWriter. writeHistogramEventCustomBins(String name, LogFileWriter.EventSubtype subtype, long time, int iteration, int epoch, INDArray bins, INDArray y)longLogFileWriter. writeHistogramEventDiscrete(@NonNull String name, LogFileWriter.EventSubtype subtype, long time, int iteration, int epoch, List<String> binLabels, @NonNull INDArray y)longLogFileWriter. writeHistogramEventEqualSpacing(String name, LogFileWriter.EventSubtype subtype, long time, int iteration, int epoch, double min, double max, INDArray y) -
Uses of INDArray in org.nd4j.imports.graphmapper.tf
Methods in org.nd4j.imports.graphmapper.tf that return INDArray Modifier and Type Method Description static INDArrayTFGraphMapper. getArrayFrom(NodeDef nodeDef, GraphDef graph)Deprecated.static INDArrayTFGraphMapper. getNDArrayFromTensor(NodeDef node)Convert the tensor to an NDArray (if possible and if array is available)static INDArrayTFGraphMapper. mapTensorProto(TensorProto tfTensor)Convert a TensorProto to an INDArray -
Uses of INDArray in org.nd4j.imports.graphmapper.tf.tensors
Methods in org.nd4j.imports.graphmapper.tf.tensors that return INDArray Modifier and Type Method Description INDArrayTFTensorMapper. arrayFor(long[] shape, J jArr)INDArrayTFTensorMappers.BFloat16TensorMapper. arrayFor(long[] shape, float[] jArr)INDArrayTFTensorMappers.BoolTensorMapper. arrayFor(long[] shape, boolean[] jArr)INDArrayTFTensorMappers.Float16TensorMapper. arrayFor(long[] shape, float[] jArr)INDArrayTFTensorMappers.Float32TensorMapper. arrayFor(long[] shape, float[] jArr)INDArrayTFTensorMappers.Float64TensorMapper. arrayFor(long[] shape, double[] jArr)INDArrayTFTensorMappers.Int16TensorMapper. arrayFor(long[] shape, int[] jArr)INDArrayTFTensorMappers.Int32TensorMapper. arrayFor(long[] shape, int[] jArr)INDArrayTFTensorMappers.Int64TensorMapper. arrayFor(long[] shape, long[] jArr)INDArrayTFTensorMappers.Int8TensorMapper. arrayFor(long[] shape, int[] jArr)INDArrayTFTensorMappers.StringTensorMapper. arrayFor(long[] shape, String[] jArr)INDArrayTFTensorMappers.UInt16TensorMapper. arrayFor(long[] shape, int[] jArr)INDArrayTFTensorMappers.UInt32TensorMapper. arrayFor(long[] shape, long[] jArr)INDArrayTFTensorMappers.UInt64TensorMapper. arrayFor(long[] shape, long[] jArr)INDArrayTFTensorMappers.UInt8TensorMapper. arrayFor(long[] shape, int[] jArr)INDArrayTFTensorMapper. toNDArray()INDArrayTFTensorMappers.BaseTensorMapper. toNDArray() -
Uses of INDArray in org.nd4j.linalg.activations
Methods in org.nd4j.linalg.activations that return INDArray Modifier and Type Method Description INDArrayIActivation. getActivation(INDArray in, boolean training)Carry out activation function on the input array (usually known as 'preOut' or 'z') Implementations must overwrite "in", transform in place and return "in" Can support separate behaviour during testMethods in org.nd4j.linalg.activations that return types with arguments of type INDArray Modifier and Type Method Description Pair<INDArray,INDArray>IActivation. backprop(INDArray in, INDArray epsilon)Backpropagate the errors through the activation function, given input z and epsilon dL/da.
Returns 2 INDArrays:
(a) The gradient dL/dz, calculated from dL/da, and
(b) The parameter gradients dL/dW, where w is the weights in the activation function.Pair<INDArray,INDArray>IActivation. backprop(INDArray in, INDArray epsilon)Backpropagate the errors through the activation function, given input z and epsilon dL/da.
Returns 2 INDArrays:
(a) The gradient dL/dz, calculated from dL/da, and
(b) The parameter gradients dL/dW, where w is the weights in the activation function.Methods in org.nd4j.linalg.activations with parameters of type INDArray Modifier and Type Method Description protected voidBaseActivationFunction. assertShape(INDArray in, INDArray epsilon)Pair<INDArray,INDArray>IActivation. backprop(INDArray in, INDArray epsilon)Backpropagate the errors through the activation function, given input z and epsilon dL/da.
Returns 2 INDArrays:
(a) The gradient dL/dz, calculated from dL/da, and
(b) The parameter gradients dL/dW, where w is the weights in the activation function.INDArrayIActivation. getActivation(INDArray in, boolean training)Carry out activation function on the input array (usually known as 'preOut' or 'z') Implementations must overwrite "in", transform in place and return "in" Can support separate behaviour during test -
Uses of INDArray in org.nd4j.linalg.activations.impl
Methods in org.nd4j.linalg.activations.impl that return INDArray Modifier and Type Method Description INDArrayActivationCube. getActivation(INDArray in, boolean training)INDArrayActivationELU. getActivation(INDArray in, boolean training)INDArrayActivationGELU. getActivation(INDArray in, boolean training)INDArrayActivationHardSigmoid. getActivation(INDArray in, boolean training)INDArrayActivationHardTanH. getActivation(INDArray in, boolean training)INDArrayActivationIdentity. getActivation(INDArray in, boolean training)INDArrayActivationLReLU. getActivation(INDArray in, boolean training)INDArrayActivationMish. getActivation(INDArray in, boolean training)INDArrayActivationPReLU. getActivation(INDArray in, boolean training)INDArrayActivationRationalTanh. getActivation(INDArray in, boolean training)INDArrayActivationRectifiedTanh. getActivation(INDArray in, boolean training)INDArrayActivationReLU. getActivation(INDArray in, boolean training)INDArrayActivationReLU6. getActivation(INDArray in, boolean training)INDArrayActivationRReLU. getActivation(INDArray in, boolean training)INDArrayActivationSELU. getActivation(INDArray in, boolean training)INDArrayActivationSigmoid. getActivation(INDArray in, boolean training)INDArrayActivationSoftmax. getActivation(INDArray in, boolean training)INDArrayActivationSoftPlus. getActivation(INDArray in, boolean training)INDArrayActivationSoftSign. getActivation(INDArray in, boolean training)INDArrayActivationSwish. getActivation(INDArray in, boolean training)INDArrayActivationTanH. getActivation(INDArray in, boolean training)INDArrayActivationThresholdedReLU. getActivation(INDArray in, boolean training)Methods in org.nd4j.linalg.activations.impl with parameters of type INDArray Modifier and Type Method Description Pair<INDArray,INDArray>ActivationCube. backprop(@NonNull INDArray in, @NonNull INDArray epsilon)Pair<INDArray,INDArray>ActivationELU. backprop(INDArray in, INDArray epsilon)Pair<INDArray,INDArray>ActivationGELU. backprop(INDArray in, INDArray epsilon)Pair<INDArray,INDArray>ActivationHardSigmoid. backprop(INDArray in, INDArray epsilon)Pair<INDArray,INDArray>ActivationHardTanH. backprop(INDArray in, INDArray epsilon)Pair<INDArray,INDArray>ActivationIdentity. backprop(INDArray in, INDArray epsilon)Pair<INDArray,INDArray>ActivationLReLU. backprop(INDArray in, INDArray epsilon)Pair<INDArray,INDArray>ActivationMish. backprop(INDArray in, INDArray epsilon)Pair<INDArray,INDArray>ActivationPReLU. backprop(INDArray in, INDArray epsilon)Pair<INDArray,INDArray>ActivationRationalTanh. backprop(INDArray in, INDArray epsilon)Pair<INDArray,INDArray>ActivationRectifiedTanh. backprop(INDArray in, INDArray epsilon)Pair<INDArray,INDArray>ActivationReLU. backprop(INDArray in, INDArray epsilon)Pair<INDArray,INDArray>ActivationReLU6. backprop(INDArray in, INDArray epsilon)Pair<INDArray,INDArray>ActivationRReLU. backprop(INDArray in, INDArray epsilon)Pair<INDArray,INDArray>ActivationSELU. backprop(INDArray in, INDArray epsilon)Pair<INDArray,INDArray>ActivationSigmoid. backprop(INDArray in, INDArray epsilon)Pair<INDArray,INDArray>ActivationSoftmax. backprop(INDArray in, INDArray epsilon)Pair<INDArray,INDArray>ActivationSoftPlus. backprop(INDArray in, INDArray epsilon)Pair<INDArray,INDArray>ActivationSoftSign. backprop(INDArray in, INDArray epsilon)Pair<INDArray,INDArray>ActivationSwish. backprop(INDArray in, INDArray epsilon)Pair<INDArray,INDArray>ActivationTanH. backprop(INDArray in, INDArray epsilon)Pair<INDArray,INDArray>ActivationThresholdedReLU. backprop(INDArray in, INDArray epsilon)INDArrayActivationCube. getActivation(INDArray in, boolean training)INDArrayActivationELU. getActivation(INDArray in, boolean training)INDArrayActivationGELU. getActivation(INDArray in, boolean training)INDArrayActivationHardSigmoid. getActivation(INDArray in, boolean training)INDArrayActivationHardTanH. getActivation(INDArray in, boolean training)INDArrayActivationIdentity. getActivation(INDArray in, boolean training)INDArrayActivationLReLU. getActivation(INDArray in, boolean training)INDArrayActivationMish. getActivation(INDArray in, boolean training)INDArrayActivationPReLU. getActivation(INDArray in, boolean training)INDArrayActivationRationalTanh. getActivation(INDArray in, boolean training)INDArrayActivationRectifiedTanh. getActivation(INDArray in, boolean training)INDArrayActivationReLU. getActivation(INDArray in, boolean training)INDArrayActivationReLU6. getActivation(INDArray in, boolean training)INDArrayActivationRReLU. getActivation(INDArray in, boolean training)INDArrayActivationSELU. getActivation(INDArray in, boolean training)INDArrayActivationSigmoid. getActivation(INDArray in, boolean training)INDArrayActivationSoftmax. getActivation(INDArray in, boolean training)INDArrayActivationSoftPlus. getActivation(INDArray in, boolean training)INDArrayActivationSoftSign. getActivation(INDArray in, boolean training)INDArrayActivationSwish. getActivation(INDArray in, boolean training)INDArrayActivationTanH. getActivation(INDArray in, boolean training)INDArrayActivationThresholdedReLU. getActivation(INDArray in, boolean training)Constructors in org.nd4j.linalg.activations.impl with parameters of type INDArray Constructor Description ActivationPReLU(INDArray alpha, long[] sharedAxes) -
Uses of INDArray in org.nd4j.linalg.api.blas
Methods in org.nd4j.linalg.api.blas that return INDArray Modifier and Type Method Description INDArrayLapack. getLFactor(INDArray A)extracts the L (lower triangular) matrix from the LU factor result L will be the same dimensions as AINDArrayLapack. getPFactor(int M, INDArray ipiv)This method takes one of the ipiv returns from LAPACK and creates the permutation matrix.INDArrayLapack. getrf(INDArray A)LU decomposiiton of a matrix Factorize a matrix A The matrix A is overridden by the L & U combined.INDArrayLapack. getUFactor(INDArray A)extracts the U (upper triangular) matrix from the LU factor result U will be n x n matrix where n = num cols in AMethods in org.nd4j.linalg.api.blas with parameters of type INDArray Modifier and Type Method Description doubleLevel1. asum(INDArray arr)computes the sum of magnitudes of all vector elements or, for a complex vector x, the sumvoidLevel1. axpy(long N, double alpha, INDArray x, INDArray y)computes a vector-scalar product and adds the result to a vector.voidLevel1. copy(INDArray x, INDArray y)copy a vector to another vector.doubleLevel1. dot(long N, double alpha, INDArray X, INDArray Y)computes a vector-vector dot product.voidLevel2. gbmv(char order, char TransA, int KL, int KU, double alpha, INDArray A, INDArray X, double beta, INDArray Y)gbmv computes a matrix-vector product using a general band matrix and performs one of the following matrix-vector operations: y := alpha*a*x + beta*y for trans = 'N'or'n'; y := alpha*a'*x + beta*y for trans = 'T'or't'; y := alpha*conjg(a')*x + beta*y for trans = 'C'or'c'.voidLevel3. gemm(char Order, char TransA, char TransB, double alpha, INDArray A, INDArray B, double beta, INDArray C)gemm performs a matrix-matrix operation c := alpha*op(a)*op(b) + beta*c, where c is an m-by-n matrix, op(a) is an m-by-k matrix, op(b) is a k-by-n matrix.voidLevel3. gemm(INDArray A, INDArray B, INDArray C, boolean transposeA, boolean transposeB, double alpha, double beta)A convenience method for matrix-matrix operations with transposes.voidLevel2. gemv(char order, char transA, double alpha, INDArray A, INDArray X, double beta, INDArray Y)gemv computes a matrix-vector product using a general matrix and performs one of the following matrix-vector operations: y := alpha*a*x + beta*y for trans = 'N'or'n'; y := alpha*a'*x + beta*y for trans = 'T'or't'; y := alpha*conjg(a')*x + beta*y for trans = 'C'or'c'.voidLapack. geqrf(INDArray A, INDArray R)QR decomposiiton of a matrix Factorize a matrix A such that A = QR The matrix A is overwritten by the Q component (i.e.voidLevel2. ger(char order, double alpha, INDArray X, INDArray Y, INDArray A)performs a rank-1 update of a general m-by-n matrix a: a := alpha*x*y' + a.voidLapack. gesvd(INDArray A, INDArray S, INDArray U, INDArray VT)SVD decomposiiton of a matrix Factorize a matrix into its singular vectors and eigenvalues The decomposition is such that: A = U x S x VT gesvd = singular value decomposition (SVD) of a general matrix (GE)static longBlasBufferUtil. getBlasOffset(INDArray arr)Get blas stride for the given arraystatic intBlasBufferUtil. getBlasStride(INDArray arr)Get blas stride for the given arraystatic charBlasBufferUtil. getCharForTranspose(INDArray arr)Returns the proper character for how to interpret a buffer (fortran being N C being T)static longBlasBufferUtil. getDimension(INDArray arr, boolean defaultRows)Get the dimension associated with the given ordering.static double[]BlasBufferUtil. getDoubleData(INDArray buf)Returns the double data for this ndarray.static float[]BlasBufferUtil. getFloatData(INDArray buf)Returns the float data for this ndarray.static intBlasBufferUtil. getLd(INDArray arr)Get the leading dimension for a blas invocation.INDArrayLapack. getLFactor(INDArray A)extracts the L (lower triangular) matrix from the LU factor result L will be the same dimensions as AINDArrayLapack. getPFactor(int M, INDArray ipiv)This method takes one of the ipiv returns from LAPACK and creates the permutation matrix.INDArrayLapack. getrf(INDArray A)LU decomposiiton of a matrix Factorize a matrix A The matrix A is overridden by the L & U combined.voidLapack. getri(int N, INDArray A, int lda, int[] IPIV, INDArray WORK, int lwork, int INFO)Generate inverse ggiven LU decompstatic intBlasBufferUtil. getStrideForOrdering(INDArray arr)Return the proper stride through a vector relative to the ordering of the array This is for incX/incY parameters in BLAS.INDArrayLapack. getUFactor(INDArray A)extracts the U (upper triangular) matrix from the LU factor result U will be n x n matrix where n = num cols in AintLevel1. iamax(long N, INDArray arr, int stride)finds the element of a vector that has the largest absolute value.intLevel1. iamax(INDArray arr)finds the element of a vector that has the largest absolute value.intLevel1. iamin(INDArray arr)finds the element of a vector that has the minimum absolute value.doubleLevel1. nrm2(INDArray arr)computes the Euclidean norm of a vector.voidLapack. potrf(INDArray A, boolean lower)Triangular decomposiiton of a positive definite matrix ( cholesky ) Factorize a matrix A such that A = LL* (assuming lower==true) or A = U*U (a * represents conjugate i.e.voidLevel1. rot(long N, INDArray X, INDArray Y, double c, double s)performs rotation of points in the plane.voidLevel1. rotg(INDArray a, INDArray b, INDArray c, INDArray s)computes parameters for a Givens rotation.voidLevel1. rotmg(INDArray d1, INDArray d2, INDArray b1, double b2, INDArray P)computes the modified parameters for a Givens rotation.voidLevel2. sbmv(char order, char Uplo, double alpha, INDArray A, INDArray X, double beta, INDArray Y)sbmv computes a matrix-vector product using a symmetric band matrix: y := alpha*a*x + beta*y.voidLevel1. scal(long N, double alpha, INDArray X)computes a vector by a scalar product.static voidBlasBufferUtil. setData(double[] data, INDArray toSet)Set the data for the underlying array.static voidBlasBufferUtil. setData(float[] data, INDArray toSet)Set the data for the underlying array.voidLevel2. spmv(char order, char Uplo, double alpha, INDArray Ap, INDArray X, double beta, INDArray Y)voidLevel2. spr(char order, char Uplo, double alpha, INDArray X, INDArray Ap)spr performs a rank-1 update of an n-by-n packed symmetric matrix a: a := alpha*x*x' + a.voidLevel2. spr2(char order, char Uplo, double alpha, INDArray X, INDArray Y, INDArray A)?spr2 performs a rank-2 update of an n-by-n packed symmetric matrix a: a := alpha*x*y' + alpha*y*x' + a.voidLevel1. swap(INDArray x, INDArray y)swaps a vector with another vector.intLapack. syev(char jobz, char uplo, INDArray A, INDArray V)Caclulate the eigenvalues and vectors of a symmetric matrix.voidLevel3. symm(char Order, char Side, char Uplo, double alpha, INDArray A, INDArray B, double beta, INDArray C)her2k performs a rank-2k update of an n-by-n Hermitian matrix c, that is, one of the following operations: c := alpha*a*conjg(b') + conjg(alpha)*b*conjg(a') + beta*c, for trans = 'N'or'n' c := alpha*conjg(b')*a + conjg(alpha)*conjg(a')*b + beta*c, for trans = 'C'or'c' where c is an n-by-n Hermitian matrix; a and b are n-by-k matrices if trans = 'N'or'n', a and b are k-by-n matrices if trans = 'C'or'c'.voidLevel2. symv(char order, char Uplo, double alpha, INDArray A, INDArray X, double beta, INDArray Y)symv computes a matrix-vector product for a symmetric matrix: y := alpha*a*x + beta*y.voidLevel2. syr(char order, char Uplo, int N, double alpha, INDArray X, INDArray A)syr performs a rank-1 update of an n-by-n symmetric matrix a: a := alpha*x*x' + a.voidLevel2. syr2(char order, char Uplo, double alpha, INDArray X, INDArray Y, INDArray A)voidLevel3. syr2k(char Order, char Uplo, char Trans, double alpha, INDArray A, INDArray B, double beta, INDArray C)yr2k performs a rank-2k update of an n-by-n symmetric matrix c, that is, one of the following operations: c := alpha*a*b' + alpha*b*a' + beta*c for trans = 'N'or'n' c := alpha*a'*b + alpha*b'*a + beta*c for trans = 'T'or't', where c is an n-by-n symmetric matrix; a and b are n-by-k matrices, if trans = 'N'or'n', a and b are k-by-n matrices, if trans = 'T'or't'.voidLevel3. syrk(char Order, char Uplo, char Trans, double alpha, INDArray A, double beta, INDArray C)syrk performs a rank-n update of an n-by-n symmetric matrix c, that is, one of the following operations: c := alpha*a*a' + beta*c for trans = 'N'or'n' c := alpha*a'*a + beta*c for trans = 'T'or't','C'or'c', where c is an n-by-n symmetric matrix; a is an n-by-k matrix, if trans = 'N'or'n', a is a k-by-n matrix, if trans = 'T'or't','C'or'c'.voidLevel2. tbmv(char order, char Uplo, char TransA, char Diag, INDArray A, INDArray X)syr2 performs a rank-2 update of an n-by-n symmetric matrix a: a := alpha*x*y' + alpha*y*x' + a.voidLevel2. tbsv(char order, char Uplo, char TransA, char Diag, INDArray A, INDArray X)?tbsv solves a system of linear equations whose coefficients are in a triangular band matrix.voidLevel2. tpmv(char order, char Uplo, char TransA, char Diag, INDArray Ap, INDArray X)tpmv computes a matrix-vector product using a triangular packed matrix.voidLevel2. tpsv(char order, char Uplo, char TransA, char Diag, INDArray Ap, INDArray X)tpsv solves a system of linear equations whose coefficients are in a triangular packed matrix.voidLevel3. trmm(char Order, char Side, char Uplo, char TransA, char Diag, double alpha, INDArray A, INDArray B, INDArray C)syr2k performs a rank-2k update of an n-by-n symmetric matrix c, that is, one of the following operations: c := alpha*a*b' + alpha*b*a' + beta*c for trans = 'N'or'n' c := alpha*a'*b + alpha*b'*a + beta*c for trans = 'T'or't', where c is an n-by-n symmetric matrix; a and b are n-by-k matrices, if trans = 'N'or'n', a and b are k-by-n matrices, if trans = 'T'or't'.voidLevel2. trmv(char order, char Uplo, char TransA, char Diag, INDArray A, INDArray X)trmv computes a matrix-vector product using a triangular matrix.voidLevel3. trsm(char Order, char Side, char Uplo, char TransA, char Diag, double alpha, INDArray A, INDArray B)?trsm solves one of the following matrix equations: op(a)*x = alpha*b or x*op(a) = alpha*b, where x and b are m-by-n general matrices, and a is triangular; op(a) must be an m-by-m matrix, if side = 'L'or'l' op(a) must be an n-by-n matrix, if side = 'R'or'r'.voidLevel2. trsv(char order, char Uplo, char TransA, char Diag, INDArray A, INDArray X)trsv solves a system of linear equations whose coefficients are in a triangular matrix. -
Uses of INDArray in org.nd4j.linalg.api.blas.impl
Methods in org.nd4j.linalg.api.blas.impl that return INDArray Modifier and Type Method Description INDArrayBaseLapack. getLFactor(INDArray A)INDArrayBaseLapack. getPFactor(int M, INDArray ipiv)INDArrayBaseLapack. getrf(INDArray A)INDArrayBaseLapack. getUFactor(INDArray A)Methods in org.nd4j.linalg.api.blas.impl with parameters of type INDArray Modifier and Type Method Description doubleBaseLevel1. asum(INDArray arr)computes the sum of magnitudes of all vector elements or, for a complex vector x, the sumvoidBaseLevel1. axpy(long n, double alpha, INDArray x, INDArray y)computes a vector-scalar product and adds the result to a vector.voidBaseLevel1. copy(INDArray x, INDArray y)swaps a vector with another vector.protected abstract doubleBaseLevel1. dasum(long N, INDArray X, int incX)protected abstract voidBaseLevel1. daxpy(long N, double alpha, INDArray X, int incX, INDArray Y, int incY)protected abstract voidBaseLevel1. dcopy(long N, INDArray X, int incX, INDArray Y, int incY)protected abstract doubleBaseLevel1. ddot(long N, INDArray X, int incX, INDArray Y, int incY)protected abstract voidBaseLevel2. dgbmv(char order, char TransA, int M, int N, int KL, int KU, double alpha, INDArray A, int lda, INDArray X, int incX, double beta, INDArray Y, int incY)protected abstract voidBaseLevel3. dgemm(char Order, char TransA, char TransB, int M, int N, int K, double alpha, INDArray A, int lda, INDArray B, int ldb, double beta, INDArray C, int ldc)protected abstract voidBaseLevel2. dgemv(char order, char TransA, int M, int N, double alpha, INDArray A, int lda, INDArray X, int incX, double beta, INDArray Y, int incY)abstract voidBaseLapack. dgeqrf(int M, int N, INDArray A, INDArray R, INDArray INFO)protected abstract voidBaseLevel2. dger(char order, int M, int N, double alpha, INDArray X, int incX, INDArray Y, int incY, INDArray A, int lda)abstract voidBaseLapack. dgesvd(byte jobu, byte jobvt, int M, int N, INDArray A, INDArray S, INDArray U, INDArray VT, INDArray INFO)abstract voidBaseLapack. dgetrf(int M, int N, INDArray A, INDArray IPIV, INDArray INFO)protected abstract doubleBaseLevel1. dnrm2(long N, INDArray X, int incX)doubleBaseLevel1. dot(long n, double alpha, INDArray X, INDArray Y)computes a vector-vector dot product.abstract voidBaseLapack. dpotrf(byte uplo, int N, INDArray A, INDArray INFO)protected abstract voidBaseLevel1. drot(long N, INDArray X, int incX, INDArray Y, int incY, double c, double s)protected abstract voidBaseLevel1. drotm(long N, INDArray X, int incX, INDArray Y, int incY, INDArray P)protected abstract voidBaseLevel1. drotmg(double d1, double d2, double b1, double b2, INDArray P)protected abstract voidBaseLevel2. dsbmv(char order, char Uplo, int N, int K, double alpha, INDArray A, int lda, INDArray X, int incX, double beta, INDArray Y, int incY)protected abstract voidBaseLevel1. dscal(long N, double alpha, INDArray X, int incX)protected abstract doubleBaseLevel1. dsdot(long N, INDArray X, int incX, INDArray Y, int incY)protected abstract voidBaseLevel2. dspmv(char order, char Uplo, int N, double alpha, INDArray Ap, INDArray X, int incX, double beta, INDArray Y, int incY)protected abstract voidBaseLevel2. dspr(char order, char Uplo, int N, double alpha, INDArray X, int incX, INDArray Ap)protected abstract voidBaseLevel2. dspr2(char order, char Uplo, int N, double alpha, INDArray X, int incX, INDArray Y, int incY, INDArray A)protected abstract voidBaseLevel1. dswap(long N, INDArray X, int incX, INDArray Y, int incY)abstract intBaseLapack. dsyev(char jobz, char uplo, int N, INDArray A, INDArray R)protected abstract voidBaseLevel3. dsymm(char Order, char Side, char Uplo, int M, int N, double alpha, INDArray A, int lda, INDArray B, int ldb, double beta, INDArray C, int ldc)protected abstract voidBaseLevel2. dsymv(char order, char Uplo, int N, double alpha, INDArray A, int lda, INDArray X, int incX, double beta, INDArray Y, int incY)protected abstract voidBaseLevel2. dsyr(char order, char Uplo, int N, double alpha, INDArray X, int incX, INDArray A, int lda)protected abstract voidBaseLevel2. dsyr2(char order, char Uplo, int N, double alpha, INDArray X, int incX, INDArray Y, int incY, INDArray A, int lda)protected abstract voidBaseLevel3. dsyr2k(char Order, char Uplo, char Trans, int N, int K, double alpha, INDArray A, int lda, INDArray B, int ldb, double beta, INDArray C, int ldc)protected abstract voidBaseLevel3. dsyrk(char Order, char Uplo, char Trans, int N, int K, double alpha, INDArray A, int lda, double beta, INDArray C, int ldc)protected abstract voidBaseLevel2. dtbmv(char order, char Uplo, char TransA, char Diag, int N, int K, INDArray A, int lda, INDArray X, int incX)protected abstract voidBaseLevel2. dtbsv(char order, char Uplo, char TransA, char Diag, int N, int K, INDArray A, int lda, INDArray X, int incX)protected abstract voidBaseLevel2. dtpmv(char order, char Uplo, char TransA, char Diag, int N, INDArray Ap, INDArray X, int incX)protected abstract voidBaseLevel2. dtpsv(char order, char Uplo, char TransA, char Diag, int N, INDArray Ap, INDArray X, int incX)protected abstract voidBaseLevel3. dtrmm(char Order, char Side, char Uplo, char TransA, char Diag, int M, int N, double alpha, INDArray A, int lda, INDArray B, int ldb)protected abstract voidBaseLevel2. dtrmv(char order, char Uplo, char TransA, char Diag, int N, INDArray A, int lda, INDArray X, int incX)protected abstract voidBaseLevel3. dtrsm(char Order, char Side, char Uplo, char TransA, char Diag, int M, int N, double alpha, INDArray A, int lda, INDArray B, int ldb)protected abstract voidBaseLevel2. dtrsv(char order, char Uplo, char TransA, char Diag, int N, INDArray A, int lda, INDArray X, int incX)voidBaseLevel2. gbmv(char order, char TransA, int KL, int KU, double alpha, INDArray A, INDArray X, double beta, INDArray Y)gbmv computes a matrix-vector product using a general band matrix and performs one of the following matrix-vector operations: y := alpha*a*x + beta*y for trans = 'N'or'n'; y := alpha*a'*x + beta*y for trans = 'T'or't'; y := alpha*conjg(a')*x + beta*y for trans = 'C'or'c'.voidBaseLevel3. gemm(char Order, char TransA, char TransB, double alpha, INDArray A, INDArray B, double beta, INDArray C)gemm performs a matrix-matrix operation c := alpha*op(a)*op(b) + beta*c, where c is an m-by-n matrix, op(a) is an m-by-k matrix, op(b) is a k-by-n matrix.voidBaseLevel3. gemm(INDArray A, INDArray B, INDArray C, boolean transposeA, boolean transposeB, double alpha, double beta)A convenience method for matrix-matrix operations with transposes.voidBaseLevel2. gemv(char order, char transA, double alpha, INDArray A, INDArray X, double beta, INDArray Y)gemv computes a matrix-vector product using a general matrix and performs one of the following matrix-vector operations: y := alpha*a*x + beta*y for trans = 'N'or'n'; y := alpha*a'*x + beta*y for trans = 'T'or't'; y := alpha*conjg(a')*x + beta*y for trans = 'C'or'c'.voidBaseLapack. geqrf(INDArray A, INDArray R)voidBaseLevel2. ger(char order, double alpha, INDArray X, INDArray Y, INDArray A)performs a rank-1 update of a general m-by-n matrix a: a := alpha*x*y' + a.voidBaseLapack. gesvd(INDArray A, INDArray S, INDArray U, INDArray VT)INDArrayBaseLapack. getLFactor(INDArray A)INDArrayBaseLapack. getPFactor(int M, INDArray ipiv)INDArrayBaseLapack. getrf(INDArray A)INDArrayBaseLapack. getUFactor(INDArray A)protected abstract floatBaseLevel1. hasum(long N, INDArray X, int incX)protected abstract voidBaseLevel1. haxpy(long N, float alpha, INDArray X, int incX, INDArray Y, int incY)protected abstract floatBaseLevel1. hdot(long N, INDArray X, int incX, INDArray Y, int incY)protected abstract voidBaseLevel3. hgemm(char Order, char TransA, char TransB, int M, int N, int K, float alpha, INDArray A, int lda, INDArray B, int ldb, float beta, INDArray C, int ldc)intBaseLevel1. iamax(long n, INDArray arr, int stride)intBaseLevel1. iamax(INDArray arr)finds the element of a vector that has the largest absolute value.intBaseLevel1. iamin(INDArray arr)finds the element of a vector that has the minimum absolute value.protected abstract intBaseLevel1. idamax(long N, INDArray X, int incX)protected abstract intBaseLevel1. isamax(long N, INDArray X, int incX)doubleBaseLevel1. nrm2(INDArray arr)computes the Euclidean norm of a vector.voidBaseLapack. potrf(INDArray A, boolean lower)voidBaseLevel1. rot(long N, INDArray X, INDArray Y, double c, double s)performs rotation of points in the plane.voidBaseLevel1. rotg(INDArray a, INDArray b, INDArray c, INDArray s)computes parameters for a Givens rotation.voidBaseLevel1. rotmg(INDArray d1, INDArray d2, INDArray b1, double b2, INDArray P)computes the modified parameters for a Givens rotation.protected abstract floatBaseLevel1. sasum(long N, INDArray X, int incX)protected abstract voidBaseLevel1. saxpy(long N, float alpha, INDArray X, int incX, INDArray Y, int incY)voidBaseLevel2. sbmv(char order, char Uplo, double alpha, INDArray A, INDArray X, double beta, INDArray Y)sbmv computes a matrix-vector product using a symmetric band matrix: y := alpha*a*x + beta*y.voidBaseLevel1. scal(long N, double alpha, INDArray X)computes a vector by a scalar product.protected abstract voidBaseLevel1. scopy(long N, INDArray X, int incX, INDArray Y, int incY)protected abstract floatBaseLevel1. sdot(long N, INDArray X, int incX, INDArray Y, int incY)protected abstract floatBaseLevel1. sdsdot(long N, float alpha, INDArray X, int incX, INDArray Y, int incY)protected abstract voidBaseLevel2. sgbmv(char order, char TransA, int M, int N, int KL, int KU, float alpha, INDArray A, int lda, INDArray X, int incX, float beta, INDArray Y, int incY)protected abstract voidBaseLevel3. sgemm(char Order, char TransA, char TransB, int M, int N, int K, float alpha, INDArray A, int lda, INDArray B, int ldb, float beta, INDArray C, int ldc)protected abstract voidBaseLevel2. sgemv(char order, char TransA, int M, int N, float alpha, INDArray A, int lda, INDArray X, int incX, float beta, INDArray Y, int incY)abstract voidBaseLapack. sgeqrf(int M, int N, INDArray A, INDArray R, INDArray INFO)Float/Double versions of QR decomp.protected abstract voidBaseLevel2. sger(char order, int M, int N, float alpha, INDArray X, int incX, INDArray Y, int incY, INDArray A, int lda)abstract voidBaseLapack. sgesvd(byte jobu, byte jobvt, int M, int N, INDArray A, INDArray S, INDArray U, INDArray VT, INDArray INFO)abstract voidBaseLapack. sgetrf(int M, int N, INDArray A, INDArray IPIV, INDArray INFO)Float/Double versions of LU decomp.protected abstract floatBaseLevel1. snrm2(long N, INDArray X, int incX)voidBaseLevel2. spmv(char order, char Uplo, double alpha, INDArray Ap, INDArray X, double beta, INDArray Y)abstract voidBaseLapack. spotrf(byte uplo, int N, INDArray A, INDArray INFO)Float/Double versions of cholesky decomp for positive definite matrices A = LL*voidBaseLevel2. spr(char order, char Uplo, double alpha, INDArray X, INDArray Ap)spr performs a rank-1 update of an n-by-n packed symmetric matrix a: a := alpha*x*x' + a.voidBaseLevel2. spr2(char order, char Uplo, double alpha, INDArray X, INDArray Y, INDArray A)?spr2 performs a rank-2 update of an n-by-n packed symmetric matrix a: a := alpha*x*y' + alpha*y*x' + a.protected abstract voidBaseLevel1. srot(long N, INDArray X, int incX, INDArray Y, int incY, float c, float s)protected abstract voidBaseLevel1. srotm(long N, INDArray X, int incX, INDArray Y, int incY, INDArray P)protected abstract voidBaseLevel1. srotmg(float d1, float d2, float b1, float b2, INDArray P)protected abstract voidBaseLevel2. ssbmv(char order, char Uplo, int N, int K, float alpha, INDArray A, int lda, INDArray X, int incX, float beta, INDArray Y, int incY)protected abstract voidBaseLevel1. sscal(long N, float alpha, INDArray X, int incX)protected abstract voidBaseLevel2. sspmv(char order, char Uplo, int N, float alpha, INDArray Ap, INDArray X, int incX, float beta, INDArray Y, int incY)protected abstract voidBaseLevel2. sspr(char order, char Uplo, int N, float alpha, INDArray X, int incX, INDArray Ap)protected abstract voidBaseLevel2. sspr2(char order, char Uplo, int N, float alpha, INDArray X, int incX, INDArray Y, int incY, INDArray A)protected abstract voidBaseLevel1. sswap(long N, INDArray X, int incX, INDArray Y, int incY)abstract intBaseLapack. ssyev(char jobz, char uplo, int N, INDArray A, INDArray R)Float/Double versions of eigen value/vector calc.protected abstract voidBaseLevel3. ssymm(char Order, char Side, char Uplo, int M, int N, float alpha, INDArray A, int lda, INDArray B, int ldb, float beta, INDArray C, int ldc)protected abstract voidBaseLevel2. ssymv(char order, char Uplo, int N, float alpha, INDArray A, int lda, INDArray X, int incX, float beta, INDArray Y, int incY)protected abstract voidBaseLevel2. ssyr(char order, char Uplo, int N, float alpha, INDArray X, int incX, INDArray A, int lda)protected abstract voidBaseLevel2. ssyr2(char order, char Uplo, int N, float alpha, INDArray X, int incX, INDArray Y, int incY, INDArray A, int lda)protected abstract voidBaseLevel3. ssyr2k(char Order, char Uplo, char Trans, int N, int K, float alpha, INDArray A, int lda, INDArray B, int ldb, float beta, INDArray C, int ldc)protected abstract voidBaseLevel3. ssyrk(char Order, char Uplo, char Trans, int N, int K, float alpha, INDArray A, int lda, float beta, INDArray C, int ldc)protected abstract voidBaseLevel2. stbmv(char order, char Uplo, char TransA, char Diag, int N, int K, INDArray A, int lda, INDArray X, int incX)protected abstract voidBaseLevel2. stbsv(char order, char Uplo, char TransA, char Diag, int N, int K, INDArray A, int lda, INDArray X, int incX)protected abstract voidBaseLevel2. stpmv(char order, char Uplo, char TransA, char Diag, int N, INDArray Ap, INDArray X, int incX)protected abstract voidBaseLevel2. stpsv(char order, char Uplo, char TransA, char Diag, int N, INDArray Ap, INDArray X, int incX)protected abstract voidBaseLevel3. strmm(char Order, char Side, char Uplo, char TransA, char Diag, int M, int N, float alpha, INDArray A, int lda, INDArray B, int ldb)protected abstract voidBaseLevel2. strmv(char order, char Uplo, char TransA, char Diag, int N, INDArray A, int lda, INDArray X, int incX)protected abstract voidBaseLevel3. strsm(char Order, char Side, char Uplo, char TransA, char Diag, int M, int N, float alpha, INDArray A, int lda, INDArray B, int ldb)protected abstract voidBaseLevel2. strsv(char order, char Uplo, char TransA, char Diag, int N, INDArray A, int lda, INDArray X, int incX)voidBaseLevel1. swap(INDArray x, INDArray y)swaps a vector with another vector.intBaseLapack. syev(char jobz, char uplo, INDArray A, INDArray V)voidBaseLevel3. symm(char Order, char Side, char Uplo, double alpha, INDArray A, INDArray B, double beta, INDArray C)her2k performs a rank-2k update of an n-by-n Hermitian matrix c, that is, one of the following operations: c := alpha*a*conjg(b') + conjg(alpha)*b*conjg(a') + beta*c, for trans = 'N'or'n' c := alpha*conjg(b')*a + conjg(alpha)*conjg(a')*b + beta*c, for trans = 'C'or'c' where c is an n-by-n Hermitian matrix; a and b are n-by-k matrices if trans = 'N'or'n', a and b are k-by-n matrices if trans = 'C'or'c'.voidBaseLevel2. symv(char order, char Uplo, double alpha, INDArray A, INDArray X, double beta, INDArray Y)symv computes a matrix-vector product for a symmetric matrix: y := alpha*a*x + beta*y.voidBaseLevel2. syr(char order, char Uplo, int N, double alpha, INDArray X, INDArray A)syr performs a rank-1 update of an n-by-n symmetric matrix a: a := alpha*x*x' + a.voidBaseLevel2. syr2(char order, char Uplo, double alpha, INDArray X, INDArray Y, INDArray A)voidBaseLevel3. syr2k(char Order, char Uplo, char Trans, double alpha, INDArray A, INDArray B, double beta, INDArray C)yr2k performs a rank-2k update of an n-by-n symmetric matrix c, that is, one of the following operations: c := alpha*a*b' + alpha*b*a' + beta*c for trans = 'N'or'n' c := alpha*a'*b + alpha*b'*a + beta*c for trans = 'T'or't', where c is an n-by-n symmetric matrix; a and b are n-by-k matrices, if trans = 'N'or'n', a and b are k-by-n matrices, if trans = 'T'or't'.voidBaseLevel3. syrk(char Order, char Uplo, char Trans, double alpha, INDArray A, double beta, INDArray C)syrk performs a rank-n update of an n-by-n symmetric matrix c, that is, one of the following operations: c := alpha*a*a' + beta*c for trans = 'N'or'n' c := alpha*a'*a + beta*c for trans = 'T'or't','C'or'c', where c is an n-by-n symmetric matrix; a is an n-by-k matrix, if trans = 'N'or'n', a is a k-by-n matrix, if trans = 'T'or't','C'or'c'.voidBaseLevel2. tbmv(char order, char Uplo, char TransA, char Diag, INDArray A, INDArray X)syr2 performs a rank-2 update of an n-by-n symmetric matrix a: a := alpha*x*y' + alpha*y*x' + a.voidBaseLevel2. tbsv(char order, char Uplo, char TransA, char Diag, INDArray A, INDArray X)?tbsv solves a system of linear equations whose coefficients are in a triangular band matrix.voidBaseLevel2. tpmv(char order, char Uplo, char TransA, char Diag, INDArray Ap, INDArray X)tpmv computes a matrix-vector product using a triangular packed matrix.voidBaseLevel2. tpsv(char order, char Uplo, char TransA, char Diag, INDArray Ap, INDArray X)tpsv solves a system of linear equations whose coefficients are in a triangular packed matrix.voidBaseLevel3. trmm(char Order, char Side, char Uplo, char TransA, char Diag, double alpha, INDArray A, INDArray B, INDArray C)syr2k performs a rank-2k update of an n-by-n symmetric matrix c, that is, one of the following operations: c := alpha*a*b' + alpha*b*a' + beta*c for trans = 'N'or'n' c := alpha*a'*b + alpha*b'*a + beta*c for trans = 'T'or't', where c is an n-by-n symmetric matrix; a and b are n-by-k matrices, if trans = 'N'or'n', a and b are k-by-n matrices, if trans = 'T'or't'.voidBaseLevel2. trmv(char order, char Uplo, char TransA, char Diag, INDArray A, INDArray X)trmv computes a matrix-vector product using a triangular matrix.voidBaseLevel3. trsm(char Order, char Side, char Uplo, char TransA, char Diag, double alpha, INDArray A, INDArray B)?trsm solves one of the following matrix equations: op(a)*x = alpha*b or x*op(a) = alpha*b, where x and b are m-by-n general matrices, and a is triangular; op(a) must be an m-by-m matrix, if side = 'L'or'l' op(a) must be an n-by-n matrix, if side = 'R'or'r'.voidBaseLevel2. trsv(char order, char Uplo, char TransA, char Diag, INDArray A, INDArray X)trsv solves a system of linear equations whose coefficients are in a triangular matrix. -
Uses of INDArray in org.nd4j.linalg.api.blas.params
Methods in org.nd4j.linalg.api.blas.params that return INDArray Modifier and Type Method Description INDArrayMMulTranspose. exec(INDArray a, INDArray b, INDArray result)Execute the matrix multiplication: A x B Note that if a or b have transposeA/B == true, then this is done internally.Methods in org.nd4j.linalg.api.blas.params with parameters of type INDArray Modifier and Type Method Description INDArrayMMulTranspose. exec(INDArray a, INDArray b, INDArray result)Execute the matrix multiplication: A x B Note that if a or b have transposeA/B == true, then this is done internally.Constructors in org.nd4j.linalg.api.blas.params with parameters of type INDArray Constructor Description GemmParams(INDArray a, INDArray b, INDArray c)GemmParams(INDArray a, INDArray b, INDArray c, boolean transposeA, boolean transposeB)GemvParameters(INDArray a, INDArray x, INDArray y) -
Uses of INDArray in org.nd4j.linalg.api.concurrency
Methods in org.nd4j.linalg.api.concurrency that return INDArray Modifier and Type Method Description INDArrayDistributedINDArray. entry()This method returns INDArray for the current device PLEASE NOTE: if you use more than one thread per device you'd better not use this method unless you're 100% sureINDArrayDistributedINDArray. entry(int entry)This method returns INDArray for specific entry (i.e.INDArrayAffinityManager. replicateToDevice(Integer deviceId, INDArray array)This method replicates given INDArray, and places it to target device.INDArrayBasicAffinityManager. replicateToDevice(Integer deviceId, INDArray array)This method replicates given INDArray, and places it to target device.Methods in org.nd4j.linalg.api.concurrency with parameters of type INDArray Modifier and Type Method Description voidAffinityManager. ensureLocation(INDArray array, AffinityManager.Location location)This method propagates given INDArray to specified locationvoidBasicAffinityManager. ensureLocation(INDArray array, AffinityManager.Location location)AffinityManager.LocationAffinityManager. getActiveLocation(INDArray array)This method returns last-updated location for the given INDArrayAffinityManager.LocationBasicAffinityManager. getActiveLocation(INDArray array)IntegerAffinityManager. getDeviceForArray(INDArray array)This method returns id of current device for a given INDArrayIntegerBasicAffinityManager. getDeviceForArray(INDArray array)voidDistributedINDArray. propagate(INDArray array)This method propagates given INDArray to all entries as isINDArrayAffinityManager. replicateToDevice(Integer deviceId, INDArray array)This method replicates given INDArray, and places it to target device.INDArrayBasicAffinityManager. replicateToDevice(Integer deviceId, INDArray array)This method replicates given INDArray, and places it to target device.voidAffinityManager. tagLocation(INDArray array, AffinityManager.Location location)This method tags specific INDArray as "recent" on specified locationvoidBasicAffinityManager. tagLocation(INDArray array, AffinityManager.Location location)voidAffinityManager. touch(INDArray array)Utility method, to associate INDArray with specific device (backend-specific) -
Uses of INDArray in org.nd4j.linalg.api.iter
Constructors in org.nd4j.linalg.api.iter with parameters of type INDArray Constructor Description FirstAxisIterator(INDArray iterateOver)INDArrayIterator(INDArray iterateOver) -
Uses of INDArray in org.nd4j.linalg.api.memory
Methods in org.nd4j.linalg.api.memory with parameters of type INDArray Modifier and Type Method Description voidBasicMemoryManager. collect(INDArray... arrays)This method detaches off-heap memory from passed INDArray instances, and optionally stores them in cache for future reuse PLEASE NOTE: Cache options depend on specific implementationsvoidMemoryManager. collect(INDArray... arrays)This method detaches off-heap memory from passed INDArray instances, and optionally stores them in cache for future reuse PLEASE NOTE: Cache options depend on specific implementationsvoidMemoryManager. memset(INDArray array)This method fills given INDArray with zeroes. -
Uses of INDArray in org.nd4j.linalg.api.memory.stash
Fields in org.nd4j.linalg.api.memory.stash with type parameters of type INDArray Modifier and Type Field Description protected Map<T,INDArray>BasicStash. stashMethods in org.nd4j.linalg.api.memory.stash that return INDArray Modifier and Type Method Description INDArrayBasicStash. get(T key)INDArrayStash. get(T key)Methods in org.nd4j.linalg.api.memory.stash with parameters of type INDArray Modifier and Type Method Description voidBasicStash. put(T key, INDArray object)voidStash. put(T key, INDArray object) -
Uses of INDArray in org.nd4j.linalg.api.ndarray
Classes in org.nd4j.linalg.api.ndarray that implement INDArray Modifier and Type Class Description classBaseNDArrayMethods in org.nd4j.linalg.api.ndarray that return INDArray Modifier and Type Method Description INDArrayBaseNDArray. add(Number n)INDArrayBaseNDArray. add(Number n, INDArray result)INDArrayBaseNDArray. add(INDArray other)INDArrayBaseNDArray. add(INDArray other, INDArray result)INDArrayINDArray. add(Number n)Scalar addition (cloning)INDArrayINDArray. add(Number n, INDArray result)Addition of this ndarray.INDArrayINDArray. add(INDArray other)Element-wise copy addition of two NDArraysINDArrayINDArray. add(INDArray other, INDArray result)Element-wise copy addition of two NDArraysINDArrayBaseNDArray. addColumnVector(INDArray columnVector)INDArrayINDArray. addColumnVector(INDArray columnVector)Addition of a column vector (copy)INDArrayBaseNDArray. addi(Number n)INDArrayBaseNDArray. addi(Number n, INDArray result)INDArrayBaseNDArray. addi(INDArray other)INDArrayBaseNDArray. addi(INDArray other, INDArray result)INDArrayINDArray. addi(Number n)In place scalar additionINDArrayINDArray. addi(Number n, INDArray result)In place additionINDArrayINDArray. addi(INDArray other)in place (element wise) addition of two NDArraysINDArrayINDArray. addi(INDArray other, INDArray result)in place (element wise) addition of two NDArraysINDArrayBaseNDArray. addiColumnVector(INDArray columnVector)INDArrayINDArray. addiColumnVector(INDArray columnVector)In place addition of a column vectorINDArrayBaseNDArray. addiRowVector(INDArray rowVector)INDArrayINDArray. addiRowVector(INDArray rowVector)In place addition of a row vectorINDArrayBaseNDArray. addRowVector(INDArray rowVector)INDArrayINDArray. addRowVector(INDArray rowVector)Addition of a row vector (copy)INDArrayBaseNDArray. amax(int... dimension)INDArrayINDArray. amax(int... dimension)Returns the absolute overall max of this ndarray along given dimensionsINDArrayBaseNDArray. amean(int... dimension)INDArrayINDArray. amean(int... dimension)Returns the absolute overall mean of this ndarrayINDArrayBaseNDArray. amin(int... dimension)INDArrayINDArray. amin(int... dimension)Returns minimum (absolute) value in this INDArray, along the specified dimensionsINDArrayBaseNDArray. argMax(int... dimension)INDArrayINDArray. argMax(int... dimension)This method returns index of highest value along specified dimension(s)INDArrayBaseNDArray. assign(boolean value)INDArrayBaseNDArray. assign(Number value)INDArrayBaseNDArray. assign(INDArray arr)INDArrayINDArray. assign(boolean value)Set all entries of the ndarray to the specified valueINDArrayINDArray. assign(Number value)Set all entries of the ndarray to the specified valueINDArrayINDArray. assign(INDArray arr)Assign all of the elements in the given ndarray to this ndarrayINDArrayBaseNDArray. assignIf(INDArray arr, Condition condition)INDArrayINDArray. assignIf(INDArray arr, Condition condition)Assign all elements from given ndarray that are matching given condition, ndarray to this ndarrayINDArrayBaseNDArray. broadcast(long... shape)INDArrayBaseNDArray. broadcast(INDArray result)INDArrayINDArray. broadcast(long... shape)Broadcasts this ndarray to be the specified shapeINDArrayINDArray. broadcast(INDArray result)Broadcasts this ndarray to be the specified shapeINDArrayBaseNDArray. castTo(DataType dataType)INDArrayINDArray. castTo(DataType dataType)This method cast elements of this INDArray to new data typeINDArrayBaseNDArray. cond(Condition condition)INDArrayINDArray. cond(Condition condition)Returns a binary INDArray with value 'true' if the element matches the specified condition and 'false' otherwiseprotected INDArrayBaseNDArray. create(int[] shape)protected INDArrayBaseNDArray. create(int[] shape, char ordering)protected INDArrayBaseNDArray. create(int[] shape, int[] strides, long offset)protected INDArrayBaseNDArray. create(int rows, int length)protected INDArrayBaseNDArray. create(DataBuffer buffer)protected INDArrayBaseNDArray. create(DataBuffer data, int[] shape, int[] strides)protected INDArrayBaseNDArray. create(DataBuffer data, int[] newShape, int[] newStrides, long offset)protected INDArrayBaseNDArray. create(DataBuffer data, int[] newShape, int[] newStrides, long offset, char ordering)protected INDArrayBaseNDArray. create(DataBuffer data, int[] shape, long offset)protected INDArrayBaseNDArray. create(DataBuffer data, long[] newShape, long[] newStrides, long offset, char ordering)protected INDArrayBaseNDArray. createScalar(double d)protected INDArrayBaseNDArray. createScalarForIndex(long i, boolean applyOffset)INDArrayBaseNDArray. cumsum(int dimension)INDArrayINDArray. cumsum(int dimension)Returns the cumulative sum along a dimension.INDArrayBaseNDArray. cumsumi(int dimension)INDArrayINDArray. cumsumi(int dimension)Returns the cumulative sum along a dimension.INDArrayBaseNDArray. detach()INDArrayINDArray. detach()This method detaches INDArray from Workspace, returning copy.INDArrayBaseNDArray. dimShuffle(Object[] rearrange, int[] newOrder, boolean[] broadCastable)Deprecated.INDArrayBaseNDArray. dimShuffle(Object[] rearrange, long[] newOrder, boolean[] broadCastable)Dimshuffle: an extension of permute that adds the ability to broadcast various dimensions.INDArrayINDArray. dimShuffle(Object[] rearrange, int[] newOrder, boolean[] broadCastable)Dimshuffle: an extension of permute that adds the ability to broadcast various dimensions.INDArrayINDArray. dimShuffle(Object[] rearrange, long[] newOrder, boolean[] broadCastable)INDArrayBaseNDArray. div(Number n)INDArrayBaseNDArray. div(Number n, INDArray result)INDArrayBaseNDArray. div(INDArray other)INDArrayBaseNDArray. div(INDArray other, INDArray result)INDArrayINDArray. div(Number n)Division by a numberINDArrayINDArray. div(Number n, INDArray result)Division if ndarray by numberINDArrayINDArray. div(INDArray other)Copy (element wise) division of two NDArraysINDArrayINDArray. div(INDArray other, INDArray result)copy (element wise) division of two NDArraysINDArrayBaseNDArray. divColumnVector(INDArray columnVector)INDArrayINDArray. divColumnVector(INDArray columnVector)Division of a column vector (copy)INDArrayBaseNDArray. divi(Number n)INDArrayBaseNDArray. divi(Number n, INDArray result)INDArrayBaseNDArray. divi(INDArray other)INDArrayBaseNDArray. divi(INDArray other, INDArray result)INDArrayINDArray. divi(Number n)In place scalar divisionINDArrayINDArray. divi(Number n, INDArray result)In place division of this ndarrayINDArrayINDArray. divi(INDArray other)in place (element wise) division of two NDArraysINDArrayINDArray. divi(INDArray other, INDArray result)in place (element wise) division of two NDArraysINDArrayBaseNDArray. diviColumnVector(INDArray columnVector)INDArrayINDArray. diviColumnVector(INDArray columnVector)In place division of a column vectorINDArrayBaseNDArray. diviRowVector(INDArray rowVector)INDArrayINDArray. diviRowVector(INDArray rowVector)In place division of a row vectorINDArrayBaseNDArray. divRowVector(INDArray rowVector)INDArrayINDArray. divRowVector(INDArray rowVector)Division of a row vector (copy)protected INDArrayBaseNDArray. doColumnWise(INDArray columnVector, char operation)Do a row wise op (a,s,m,d) a : add s : subtract m : multiply d : divide h : reverse subtraction t : reverse divisionprotected INDArrayBaseNDArray. doRowWise(INDArray rowVector, char operation)Do a row wise op (a,s,m,d) a : add s : subtract m : multiply d : divide h : reverse subtraction t : reverse divisionINDArrayBaseNDArray. dup()INDArrayBaseNDArray. dup(char order)INDArrayINDArray. dup()Returns a copy of this ndarrayINDArrayINDArray. dup(char order)Returns a copy of this ndarray, where the returned ndarray has the specified orderINDArrayBaseNDArray. entropy(int... dimension)INDArrayINDArray. entropy(int... dimension)Returns entropy value for this INDArray along specified dimension(s)INDArrayBaseNDArray. eps(Number other)INDArrayBaseNDArray. eps(INDArray other)INDArrayINDArray. eps(Number other)Returns the binary ndarray for "Epsilon equals" comparison.INDArrayINDArray. eps(INDArray other)Returns the binary ndarray for "Epsilon equals" comparison.INDArrayBaseNDArray. eq(Number other)INDArrayBaseNDArray. eq(INDArray other)INDArrayINDArray. eq(Number other)Returns the binary ndarray for "Equals" comparison.INDArrayINDArray. eq(INDArray other)Returns the binary ndarray for "Equals" comparison.INDArrayBaseNDArray. fmod(Number denominator)INDArrayBaseNDArray. fmod(Number denominator, INDArray result)INDArrayBaseNDArray. fmod(INDArray denominator)INDArrayBaseNDArray. fmod(INDArray denominator, INDArray result)INDArrayINDArray. fmod(Number denominator)remainder of division by scalar.INDArrayINDArray. fmod(Number denominator, INDArray result)remainder of division by scalar.INDArrayINDArray. fmod(INDArray denominator)remainder of divisionINDArrayINDArray. fmod(INDArray denominator, INDArray result)remainder of divisionINDArrayBaseNDArray. fmodi(Number denominator)INDArrayBaseNDArray. fmodi(INDArray denominator)INDArrayINDArray. fmodi(Number denominator)In place fmodINDArrayINDArray. fmodi(INDArray denominator)In place fmodINDArrayBaseNDArray. get(INDArray indices)INDArrayBaseNDArray. get(INDArrayIndex... indexes)INDArrayINDArray. get(INDArray indices)Get the elements from this ndarray based on the specified indicesINDArrayINDArray. get(INDArrayIndex... indexes)Returns a subset of this array based on the specified indexesINDArrayBaseNDArray. getColumn(long c)INDArrayBaseNDArray. getColumn(long c, boolean keepDim)INDArrayINDArray. getColumn(long i)Returns the specified column.INDArrayINDArray. getColumn(long i, boolean keepDim)Returns the specified column.INDArrayBaseNDArray. getColumns(int... cindices)INDArrayINDArray. getColumns(int... columns)Get an INDArray comprised of the specified columns only.INDArrayBaseNDArray. getRow(long r)INDArrayBaseNDArray. getRow(long r, boolean keepDim)INDArrayINDArray. getRow(long i)Returns the specified row as a 1D vector.INDArrayINDArray. getRow(long i, boolean keepDim)Returns the specified row.INDArrayBaseNDArray. getRows(int[] rindices)INDArrayINDArray. getRows(int... rows)Get an INDArray comprised of the specified rows only.INDArrayBaseNDArray. getScalar(int[] indexes)INDArrayBaseNDArray. getScalar(long i)INDArrayBaseNDArray. getScalar(long... indexes)INDArrayBaseNDArray. getScalar(long row, long column)INDArrayINDArray. getScalar(int... indices)Returns the elements at the specified indicesINDArrayINDArray. getScalar(long i)Returns the element at the specified indexINDArrayINDArray. getScalar(long... indices)SeegetScalar(int[])INDArrayINDArray. getScalar(long row, long column)Returns the element at the specified row/columnINDArrayBaseNDArray. getWhere(Number comp, Condition condition)INDArrayBaseNDArray. getWhere(INDArray comp, Condition condition)INDArrayINDArray. getWhere(Number comp, Condition condition)Boolean indexing: Return the element if it fulfills the condition in result arrayINDArrayINDArray. getWhere(INDArray comp, Condition condition)Boolean indexing: Return the element if it fulfills the condition in result arrayINDArrayBaseNDArray. gt(Number other)INDArrayBaseNDArray. gt(INDArray other)INDArrayINDArray. gt(Number other)Returns the binary ndarray for "Greater" comparison.INDArrayINDArray. gt(INDArray other)Returns the binary ndarray for "Greater Than" comparison.INDArrayBaseNDArray. gte(Number other)INDArrayINDArray. gte(Number other)Returns binary ndarray for "Greter or equals" comparison.INDArrayBaseNDArray. isInfinite()INDArrayINDArray. isInfinite()Returns the binary NDArray with value true where this array's entries are infinite, or false where they are not infiniteINDArrayBaseNDArray. isNaN()INDArrayINDArray. isNaN()Returns the binary NDArray with value true where this array's entries are NaN, or false where they are not infiniteINDArrayBaseNDArray. leverage()INDArrayINDArray. leverage()This method detaches INDArray from current Workspace, and attaches it to Workspace above, if any.INDArrayBaseNDArray. leverageOrDetach(String id)INDArrayINDArray. leverageOrDetach(String id)This method detaches INDArray from current Workspace, and attaches it to Workspace with a given Id, if a workspace with the given ID is open and active.INDArrayBaseNDArray. leverageTo(String id)INDArrayBaseNDArray. leverageTo(String id, boolean enforceExistence)INDArrayINDArray. leverageTo(String id)This method detaches INDArray from current Workspace, and attaches it to Workspace with a given Id - if a workspace with that ID exists.INDArrayINDArray. leverageTo(String id, boolean enforceExistence)This method detaches INDArray from current Workspace, and attaches it to Workspace with a given Id.INDArrayBaseNDArray. like()INDArrayINDArray. like()This method returns empty array with the same dtype/order/shape as this oneINDArrayBaseNDArray. logEntropy(int... dimension)INDArrayINDArray. logEntropy(int... dimension)Returns log entropy value for this INDArray along specified dimension(s)INDArrayBaseNDArray. lt(Number other)INDArrayBaseNDArray. lt(INDArray other)INDArrayINDArray. lt(Number other)Returns the binary ndarray for "Less" comparison.INDArrayINDArray. lt(INDArray other)Returns the binary ndarray for "Less" comparison.INDArrayBaseNDArray. lte(Number other)INDArrayINDArray. lte(Number other)Returns the binary ndarray for "Less or equals" comparison.INDArrayBaseNDArray. match(Number comp, Condition condition)INDArrayBaseNDArray. match(INDArray comp, Condition condition)INDArrayINDArray. match(Number comp, Condition condition)Returns a maskINDArrayINDArray. match(INDArray comp, Condition condition)Return a mask on whether each element matches the given conditionINDArrayBaseNDArray. max(boolean keepDims, int... dimension)INDArrayBaseNDArray. max(int... dimension)INDArrayINDArray. max(boolean keepDims, int... dimension)Returns the overall max of this ndarray along given dimensionsINDArrayINDArray. max(int... dimension)Returns the overall max of this ndarray along given dimensionsINDArrayBaseNDArray. mean(boolean keepDims, int... dimension)INDArrayBaseNDArray. mean(int... dimension)INDArrayBaseNDArray. mean(@NonNull INDArray result, boolean keepDims, int... dimension)INDArrayBaseNDArray. mean(@NonNull INDArray result, int... dimension)INDArrayINDArray. mean(boolean keepDims, int... dimension)Returns the overall mean of this ndarrayINDArrayINDArray. mean(int... dimension)Returns the overall mean of this ndarrayINDArrayINDArray. mean(INDArray result, boolean keepDims, int... dimension)Returns the overall mean of this ndarrayINDArrayINDArray. mean(INDArray result, int... dimension)Returns the overall mean of this ndarrayINDArrayBaseNDArray. median(int... dimension)INDArrayINDArray. median(int... dimension)This method returns median along given dimension(s)INDArrayBaseNDArray. migrate()INDArrayBaseNDArray. migrate(boolean detachOnNoWs)INDArrayINDArray. migrate()This method pulls this INDArray into current Workspace.INDArrayINDArray. migrate(boolean detachOnNoWs)This method pulls this INDArray into current Workspace, or optionally detaches if no workspace is present.
That is:
If current workspace is present/active, INDArray is migrated to it.
If no current workspace is present/active, one of two things occur: 1.INDArrayBaseNDArray. min(boolean keepDims, int... dimension)INDArrayBaseNDArray. min(int... dimension)INDArrayINDArray. min(boolean keepDims, int... dimension)Returns the overall min of this ndarrayINDArrayINDArray. min(int... dimension)Returns the overall min of this ndarrayINDArrayBaseNDArray. mmul(INDArray other)INDArrayBaseNDArray. mmul(INDArray other, char resultOrder)INDArrayBaseNDArray. mmul(INDArray other, MMulTranspose mMulTranspose)INDArrayBaseNDArray. mmul(INDArray other, INDArray result)Perform an copy matrix multiplicationINDArrayBaseNDArray. mmul(INDArray other, INDArray result, MMulTranspose mMulTranspose)INDArrayINDArray. mmul(INDArray other)Perform a copy matrix multiplicationINDArrayINDArray. mmul(INDArray other, char resultOrder)Perform a copy matrix multiplicationINDArrayINDArray. mmul(INDArray other, MMulTranspose mMulTranspose)Perform a copy matrix multiplicationINDArrayINDArray. mmul(INDArray other, INDArray result)Perform an copy matrix multiplicationINDArrayINDArray. mmul(INDArray other, INDArray result, MMulTranspose mMulTranspose)Perform an copy matrix multiplicationINDArrayBaseNDArray. mmuli(INDArray other)INDArrayBaseNDArray. mmuli(INDArray other, MMulTranspose transpose)INDArrayBaseNDArray. mmuli(INDArray other, INDArray result)INDArrayBaseNDArray. mmuli(INDArray other, INDArray result, MMulTranspose transpose)INDArrayINDArray. mmuli(INDArray other)Perform an inplace matrix multiplicationINDArrayINDArray. mmuli(INDArray other, MMulTranspose transpose)Perform an copy matrix multiplicationINDArrayINDArray. mmuli(INDArray other, INDArray result)Perform an inplace matrix multiplicationINDArrayINDArray. mmuli(INDArray other, INDArray result, MMulTranspose transpose)Perform an in place matrix multiplicationINDArrayBaseNDArray. mul(Number n)INDArrayBaseNDArray. mul(Number n, INDArray result)INDArrayBaseNDArray. mul(INDArray other)INDArrayBaseNDArray. mul(INDArray other, INDArray result)INDArrayINDArray. mul(Number n)Scalar multiplication (copy)INDArrayINDArray. mul(Number n, INDArray result)Multiplication of ndarray.INDArrayINDArray. mul(INDArray other)copy (element wise) multiplication of two NDArraysINDArrayINDArray. mul(INDArray other, INDArray result)copy (element wise) multiplication of two NDArraysINDArrayBaseNDArray. mulColumnVector(INDArray columnVector)INDArrayINDArray. mulColumnVector(INDArray columnVector)Multiplication of a column vector (copy)INDArrayBaseNDArray. muli(Number n)INDArrayBaseNDArray. muli(Number n, INDArray result)INDArrayBaseNDArray. muli(INDArray other)INDArrayBaseNDArray. muli(INDArray other, INDArray result)INDArrayINDArray. muli(Number n)In place scalar multiplicationINDArrayINDArray. muli(Number n, INDArray result)In place multiplication of this ndarrayINDArrayINDArray. muli(INDArray other)in place (element wise) multiplication of two NDArraysINDArrayINDArray. muli(INDArray other, INDArray result)in place (element wise) multiplication of two NDArraysINDArrayBaseNDArray. muliColumnVector(INDArray columnVector)INDArrayINDArray. muliColumnVector(INDArray columnVector)In place multiplication of a column vectorINDArrayBaseNDArray. muliRowVector(INDArray rowVector)INDArrayINDArray. muliRowVector(INDArray rowVector)In place multiplication of a row vectorINDArrayBaseNDArray. mulRowVector(INDArray rowVector)INDArrayINDArray. mulRowVector(INDArray rowVector)Multiplication of a row vector (copy)INDArrayBaseNDArray. neg()INDArrayINDArray. neg()Returns the ndarray negative (cloned)INDArrayBaseNDArray. negi()INDArrayINDArray. negi()In place setting of the negative version of this ndarrayINDArrayBaseNDArray. neq(Number other)INDArrayBaseNDArray. neq(INDArray other)INDArrayINDArray. neq(Number other)Returns the binary ndarray for "Not equals" comparison.INDArrayINDArray. neq(INDArray other)Returns the binary ndarray for "Not equals" comparison.protected INDArrayBaseNDArray. newShape(long[] newShape, char ordering)INDArrayBaseNDArray. norm1(boolean keepDims, int... dimension)INDArrayBaseNDArray. norm1(int... dimension)INDArrayINDArray. norm1(boolean keepDims, int... dimension)Returns the norm1 (L1 norm, i.e., sum of absolute values; also known as Taxicab or Manhattan norm) along the specified dimensionINDArrayINDArray. norm1(int... dimension)Returns the norm1 (L1 norm, i.e., sum of absolute values; also known as Taxicab or Manhattan norm) along the specified dimensionINDArrayBaseNDArray. norm2(boolean keepDims, int... dimension)INDArrayBaseNDArray. norm2(int... dimension)INDArrayINDArray. norm2(boolean keepDims, int... dimension)Returns the norm2 (L2 norm, sqrt(sum(x_i^2), also known as Euclidean norm) along the specified dimension(s)INDArrayINDArray. norm2(int... dimension)Returns the norm2 (L2 norm, sqrt(sum(x_i^2), also known as Euclidean norm) along the specified dimension(s)INDArrayBaseNDArray. normmax(boolean keepDims, int... dimension)INDArrayBaseNDArray. normmax(int... dimension)INDArrayINDArray. normmax(boolean keepDims, int... dimension)Returns the max norm (aka infinity norm, equal to the maximum absolute value) along the specified dimension(s)INDArrayINDArray. normmax(int... dimension)Returns the max norm (aka infinity norm, equal to the maximum absolute value) along the specified dimension(s)INDArrayBaseNDArray. percentile(Number quantile, int... dimension)INDArrayINDArray. percentile(Number percentile, int... dimension)This method returns percentile along given dimension(s)INDArrayBaseNDArray. permute(int... rearrange)INDArrayINDArray. permute(int... rearrange)See: http://www.mathworks.com/help/matlab/ref/permute.htmlINDArrayBaseNDArray. permutei(int... rearrange)INDArrayINDArray. permutei(int... rearrange)An in-place version of permute.INDArrayBaseNDArray. prod(boolean keepDims, int... dimension)INDArrayBaseNDArray. prod(int... dimension)INDArrayINDArray. prod(boolean keepDims, int... dimension)Returns the product along a given dimensionINDArrayINDArray. prod(int... dimension)Returns the product along a given dimensionINDArrayBaseNDArray. put(int[] indices, INDArray element)INDArrayBaseNDArray. put(int i, int j, Number element)INDArrayBaseNDArray. put(int i, int j, INDArray element)INDArrayBaseNDArray. put(int i, INDArray element)INDArrayBaseNDArray. put(INDArray indices, INDArray element)INDArrayBaseNDArray. put(INDArrayIndex[] indices, Number element)INDArrayBaseNDArray. put(INDArrayIndex[] indices, INDArray element)INDArrayINDArray. put(int[] indices, INDArray element)Inserts the element at the specified indexINDArrayINDArray. put(int i, int j, Number element)Inserts the element at the specified indexINDArrayINDArray. put(int i, int j, INDArray element)Inserts the element at the specified indexINDArrayINDArray. put(int i, INDArray element)Inserts the element at the specified indexINDArrayINDArray. put(INDArray indices, INDArray element)Put element in to the indices denoted by the indices ndarray.INDArrayINDArray. put(INDArrayIndex[] indices, Number element)Put the elements of the ndarray in to the specified indicesINDArrayINDArray. put(INDArrayIndex[] indices, INDArray element)Put the elements of the ndarray in to the specified indicesINDArrayBaseNDArray. putColumn(int column, INDArray toPut)INDArrayINDArray. putColumn(int column, INDArray toPut)Insert a column in to this array Will throw an exception if this ndarray is not a matrixINDArrayBaseNDArray. putiColumnVector(INDArray columnVector)INDArrayINDArray. putiColumnVector(INDArray columnVector)In place assignment of a column vectorINDArrayBaseNDArray. putiRowVector(INDArray rowVector)INDArrayINDArray. putiRowVector(INDArray rowVector)in place assignment of row vector, to each row of this arrayINDArrayBaseNDArray. putRow(long row, INDArray toPut)INDArrayINDArray. putRow(long row, INDArray toPut)Insert a row in to this array Will throw an exception if this ndarray is not a matrixINDArrayBaseNDArray. putScalar(int[] indexes, double value)INDArrayBaseNDArray. putScalar(int[] indexes, float value)INDArrayBaseNDArray. putScalar(int[] indexes, int value)INDArrayBaseNDArray. putScalar(long[] indexes, double value)INDArrayBaseNDArray. putScalar(long[] indexes, float value)INDArrayBaseNDArray. putScalar(long[] indexes, int value)INDArrayBaseNDArray. putScalar(long i, double value)INDArrayBaseNDArray. putScalar(long i, float value)INDArrayBaseNDArray. putScalar(long i, int value)INDArrayBaseNDArray. putScalar(long row, long col, double value)INDArrayBaseNDArray. putScalar(long dim0, long dim1, long dim2, double value)INDArrayBaseNDArray. putScalar(long dim0, long dim1, long dim2, long dim3, double value)INDArrayINDArray. putScalar(int[] i, double value)Insert the item at the specified indicesINDArrayINDArray. putScalar(int[] indexes, float value)Put the specified float value at the specified indices in this arrayINDArrayINDArray. putScalar(int[] indexes, int value)Put the specified integer value at the specified indices in this arrayINDArrayINDArray. putScalar(long[] i, double value)INDArrayINDArray. putScalar(long[] i, float value)INDArrayINDArray. putScalar(long[] i, int value)INDArrayINDArray. putScalar(long i, double value)Insert the number linearly in to the ndarrayINDArrayINDArray. putScalar(long i, float value)Insert a scalar float at the specified indexINDArrayINDArray. putScalar(long i, int value)Insert a scalar int at the specified indexINDArrayINDArray. putScalar(long row, long col, double value)Insert the value at the specified indices, in a 2d (rank 2) NDArray
Equivalent toputScalar(int[], double)but avoids int[] creationINDArrayINDArray. putScalar(long dim0, long dim1, long dim2, double value)Insert the value at the specified indices, in a 3d (rank 3) NDArray
Equivalent toputScalar(int[], double)but avoids int[] creationINDArrayINDArray. putScalar(long dim0, long dim1, long dim2, long dim3, double value)Insert the value at the specified indices, in a 4d (rank 4) NDArray
Equivalent toputScalar(int[], double)but avoids int[] creationINDArrayBaseNDArray. putScalarUnsafe(long offset, double value)INDArrayINDArray. putScalarUnsafe(long offset, double value)Insert a scalar at the given linear offsetINDArrayBaseNDArray. putSlice(int slice, INDArray put)INDArrayINDArray. putSlice(int slice, INDArray put)Assigns the given matrix (put) to the specified sliceINDArrayBaseNDArray. putWhere(Number comp, Number put, Condition condition)INDArrayBaseNDArray. putWhere(Number comp, INDArray put, Condition condition)INDArrayBaseNDArray. putWhere(INDArray comp, INDArray put, Condition condition)INDArrayINDArray. putWhere(Number comp, Number put, Condition condition)Assign the element according to the comparison arrayINDArrayINDArray. putWhere(Number comp, INDArray put, Condition condition)Assign the element according to the comparison arrayINDArrayINDArray. putWhere(INDArray comp, INDArray put, Condition condition)Assign the element according to the comparison arrayINDArrayBaseNDArray. putWhereWithMask(INDArray mask, Number put)INDArrayBaseNDArray. putWhereWithMask(INDArray mask, INDArray put)INDArrayINDArray. putWhereWithMask(INDArray mask, Number put)Use a pre computed mask for assigning arraysINDArrayINDArray. putWhereWithMask(INDArray mask, INDArray put)Use a pre computed mask for assigning arraysINDArrayBaseNDArray. ravel()INDArrayBaseNDArray. ravel(char ordering)INDArrayINDArray. ravel()Returns a flattened version (row vector) of this ndarrayINDArrayINDArray. ravel(char order)Returns a flattened version (row vector) of this ndarrayINDArrayBaseNDArray. rdiv(Number n)INDArrayBaseNDArray. rdiv(Number n, INDArray result)INDArrayBaseNDArray. rdiv(INDArray other)INDArrayBaseNDArray. rdiv(INDArray other, INDArray result)INDArrayINDArray. rdiv(Number n)Reverse division with a scalar - i.e., (n / thisArrayValues)INDArrayINDArray. rdiv(Number n, INDArray result)Reverse division (number / ndarray)INDArrayINDArray. rdiv(INDArray other)Reverse division, elements wise.INDArrayINDArray. rdiv(INDArray other, INDArray result)Reverse divisionINDArrayBaseNDArray. rdivColumnVector(INDArray columnVector)INDArrayINDArray. rdivColumnVector(INDArray columnVector)Reverse division of a column vector (copy)INDArrayBaseNDArray. rdivi(Number n)INDArrayBaseNDArray. rdivi(Number n, INDArray result)INDArrayBaseNDArray. rdivi(INDArray other)INDArrayBaseNDArray. rdivi(INDArray other, INDArray result)INDArrayINDArray. rdivi(Number n)In place reverse division - i.e., (n / thisArrayValues)INDArrayINDArray. rdivi(Number n, INDArray result)Reverse in place divisionINDArrayINDArray. rdivi(INDArray other)Reverse divsion (in place).INDArrayINDArray. rdivi(INDArray other, INDArray result)Reverse division (in-place)INDArrayBaseNDArray. rdiviColumnVector(INDArray columnVector)INDArrayINDArray. rdiviColumnVector(INDArray columnVector)In place reverse divison of a column vectorINDArrayBaseNDArray. rdiviRowVector(INDArray rowVector)INDArrayINDArray. rdiviRowVector(INDArray rowVector)In place reverse division of a column vectorINDArrayBaseNDArray. rdivRowVector(INDArray rowVector)INDArrayINDArray. rdivRowVector(INDArray rowVector)Reverse division of a column vector (copy)INDArrayBaseNDArray. remainder(Number denominator)INDArrayBaseNDArray. remainder(Number denominator, INDArray result)INDArrayBaseNDArray. remainder(INDArray denominator)INDArrayBaseNDArray. remainder(INDArray denominator, INDArray result)INDArrayINDArray. remainder(Number denominator)The scalar remainderINDArrayINDArray. remainder(Number denominator, INDArray result)The scalar remainderINDArrayINDArray. remainder(INDArray denominator)Remainder operatorINDArrayINDArray. remainder(INDArray denominator, INDArray result)Remainder operatorINDArrayBaseNDArray. remainderi(Number denominator)INDArrayBaseNDArray. remainderi(INDArray denominator)INDArrayINDArray. remainderi(Number denominator)In place remainderINDArrayINDArray. remainderi(INDArray denominator)In place remainderINDArrayBaseNDArray. repeat(int dimension, long... repeats)INDArrayINDArray. repeat(int dimension, long... repeats)Repeat elements along a specified dimension.INDArrayBaseNDArray. replaceWhere(INDArray arr, Condition condition)INDArrayINDArray. replaceWhere(INDArray arr, Condition condition)Replaces all elements in this ndarray that are matching give condition, with corresponding elements from given arrayINDArrayBaseNDArray. repmat(int[] shape)Deprecated.INDArrayBaseNDArray. repmat(long[] shape)INDArrayINDArray. repmat(int... shape)Deprecated.INDArrayINDArray. repmat(long... shape)Replicate and tile array to fill out to the given shape See: https://github.com/numpy/numpy/blob/master/numpy/matlib.py#L310-L358INDArrayBaseNDArray. reshape(char order, boolean enforceView, long... newShape)INDArrayBaseNDArray. reshape(char order, int... newShape)Deprecated.INDArrayBaseNDArray. reshape(char order, int rows, int columns)INDArrayBaseNDArray. reshape(char order, long... newShape)INDArrayBaseNDArray. reshape(int[] shape)Reshape the ndarray in to the specified dimensions, possible errors being thrown for invalid shapes Note here that one dimension can be -1.INDArrayBaseNDArray. reshape(long... shape)INDArrayBaseNDArray. reshape(long newRows, long newColumns)INDArrayINDArray. reshape(char order, boolean enforceView, long... newShape)Reshapes the ndarray (note: it's not possible to change the length of the ndarray).INDArrayINDArray. reshape(char order, int... newShape)Reshapes the ndarray (can't change the length of the ndarray).INDArrayINDArray. reshape(char order, int rows, int columns)Reshapes the ndarray (can't change the length of the ndarray).INDArrayINDArray. reshape(char order, long... newShape)Reshapes the ndarray (can't change the length of the ndarray).INDArrayINDArray. reshape(int[] shape)Seereshape(long[])INDArrayINDArray. reshape(long... newShape)Reshapes the ndarray (can't change the length of the ndarray).INDArrayINDArray. reshape(long rows, long columns)Reshapes the ndarray (can't change the length of the ndarray).INDArrayBaseNDArray. rsub(Number n)INDArrayBaseNDArray. rsub(Number n, INDArray result)INDArrayBaseNDArray. rsub(INDArray other)INDArrayBaseNDArray. rsub(INDArray other, INDArray result)INDArrayINDArray. rsub(Number n)Reverse subtraction with duplicates - i.e., (n - thisArrayValues)INDArrayINDArray. rsub(Number n, INDArray result)Reverse subtractionINDArrayINDArray. rsub(INDArray other)Element-wise reverse subtraction (copy op).INDArrayINDArray. rsub(INDArray other, INDArray result)Reverse subtractionINDArrayBaseNDArray. rsubColumnVector(INDArray columnVector)INDArrayINDArray. rsubColumnVector(INDArray columnVector)Reverse subtraction of a column vector (copy)INDArrayBaseNDArray. rsubi(Number n)INDArrayBaseNDArray. rsubi(Number n, INDArray result)INDArrayBaseNDArray. rsubi(INDArray other)INDArrayBaseNDArray. rsubi(INDArray other, INDArray result)INDArrayINDArray. rsubi(Number n)Reverse subtraction in place - i.e., (n - thisArrayValues)INDArrayINDArray. rsubi(Number n, INDArray result)Reverse in place subtractionINDArrayINDArray. rsubi(INDArray other)Element-wise reverse subtraction (in the place op) - i.e., other - thisINDArrayINDArray. rsubi(INDArray other, INDArray result)Reverse subtraction (in-place)INDArrayBaseNDArray. rsubiColumnVector(INDArray columnVector)INDArrayINDArray. rsubiColumnVector(INDArray columnVector)In place reverse subtraction of a column vectorINDArrayBaseNDArray. rsubiRowVector(INDArray rowVector)INDArrayINDArray. rsubiRowVector(INDArray rowVector)In place reverse subtraction of a row vectorINDArrayBaseNDArray. rsubRowVector(INDArray rowVector)INDArrayINDArray. rsubRowVector(INDArray rowVector)Reverse subtraction of a row vector (copy)INDArrayBaseNDArray. shannonEntropy(int... dimension)INDArrayINDArray. shannonEntropy(int... dimension)Returns Shannon entropy value for this INDArray along specified dimension(s)INDArrayBaseNDArray. slice(long slice)INDArrayBaseNDArray. slice(long slice, int dimension)INDArrayINDArray. slice(long i)Returns the specified slice of this ndarrayINDArrayINDArray. slice(long i, int dimension)Returns the slice of this from the specified dimensionINDArrayBaseNDArray. std(boolean biasCorrected, boolean keepDims, int... dimension)INDArrayBaseNDArray. std(boolean biasCorrected, int... dimension)INDArrayBaseNDArray. std(int... dimension)INDArrayINDArray. std(boolean biasCorrected, boolean keepDims, int... dimension)Standard deviation of an ndarray along a dimensionINDArrayINDArray. std(boolean biasCorrected, int... dimension)Standard deviation of an ndarray along a dimensionINDArrayINDArray. std(int... dimension)Standard deviation of an INDArray along one or more dimensionsINDArrayBaseNDArray. sub(Number n)INDArrayBaseNDArray. sub(Number n, INDArray result)INDArrayBaseNDArray. sub(INDArray other)INDArrayBaseNDArray. sub(INDArray other, INDArray result)INDArrayINDArray. sub(Number n)Scalar subtraction (copied)INDArrayINDArray. sub(Number n, INDArray result)Subtraction of this ndarrayINDArrayINDArray. sub(INDArray other)copy subtraction of two NDArraysINDArrayINDArray. sub(INDArray other, INDArray result)copy subtraction of two NDArraysINDArrayBaseNDArray. subColumnVector(INDArray columnVector)INDArrayINDArray. subColumnVector(INDArray columnVector)Subtraction of a column vector (copy)INDArrayBaseNDArray. subi(Number n)INDArrayBaseNDArray. subi(Number n, INDArray result)INDArrayBaseNDArray. subi(INDArray other)INDArrayBaseNDArray. subi(INDArray other, INDArray result)in place subtraction of two matricesINDArrayINDArray. subi(Number n)In place scalar subtractionINDArrayINDArray. subi(Number n, INDArray result)In place subtraction of this ndarrayINDArrayINDArray. subi(INDArray other)in place (element wise) subtraction of two NDArraysINDArrayINDArray. subi(INDArray other, INDArray result)in place (element wise) subtraction of two NDArraysINDArrayBaseNDArray. subiColumnVector(INDArray columnVector)INDArrayINDArray. subiColumnVector(INDArray columnVector)In place subtraction of a column vectorINDArrayBaseNDArray. subiRowVector(INDArray rowVector)INDArrayINDArray. subiRowVector(INDArray rowVector)In place subtraction of a row vectorINDArrayBaseNDArray. subRowVector(INDArray rowVector)INDArrayINDArray. subRowVector(INDArray rowVector)Subtraction of a row vector (copy)INDArrayBaseNDArray. sum(boolean keepDim, int... dimension)INDArrayBaseNDArray. sum(int... dimension)INDArrayBaseNDArray. sum(@NonNull INDArray result, boolean keepDims, int... dimension)INDArrayBaseNDArray. sum(@NonNull INDArray result, int... dimension)INDArrayINDArray. sum(boolean keepDims, int... dimension)Returns the sum along the last dimension of this ndarrayINDArrayINDArray. sum(int... dimension)Returns the sum along the last dimension of this ndarrayINDArrayINDArray. sum(INDArray result, boolean keepDims, int... dimension)Returns the sum along the last dimension of this ndarrayINDArrayINDArray. sum(INDArray result, int... dimension)Returns the sum along the last dimension of this ndarrayINDArrayBaseNDArray. swapAxes(int dimension, int with)INDArrayINDArray. swapAxes(int dimension, int with)Mainly here for people coming from numpy.INDArrayBaseNDArray. tensorAlongDimension(long index, int... dimension)INDArrayINDArray. tensorAlongDimension(long index, int... dimension)Get the vector along a particular dimensionINDArrayBaseNDArray. transpose()INDArrayINDArray. transpose()Flip the rows and columns of a matrixINDArrayBaseNDArray. transposei()Return transposed version of this matrix.INDArrayINDArray. transposei()Flip the rows and columns of a matrix, in-placeINDArrayBaseNDArray. ulike()INDArrayINDArray. ulike()This method returns uninitialized array with the same dtype/order/shape as this oneINDArrayINDArray. unsafeDuplication()Perform efficient (but unsafe) duplication.INDArrayINDArray. unsafeDuplication(boolean blocking)Perform efficient (but unsafe) duplication.INDArrayBaseNDArray. var(boolean biasCorrected, int... dimension)INDArrayBaseNDArray. var(int... dimension)INDArrayINDArray. var(boolean biasCorrected, int... dimension)Returns the overall variance of this ndarrayINDArrayINDArray. var(int... dimension)Returns the overall variance of this ndarrayINDArrayBaseNDArray. vectorAlongDimension(int index, int dimension)INDArrayINDArray. vectorAlongDimension(int index, int dimension)Get the vector along a particular dimensionMethods in org.nd4j.linalg.api.ndarray with parameters of type INDArray Modifier and Type Method Description INDArrayBaseNDArray. add(Number n, INDArray result)INDArrayBaseNDArray. add(INDArray other)INDArrayBaseNDArray. add(INDArray other, INDArray result)INDArrayINDArray. add(Number n, INDArray result)Addition of this ndarray.INDArrayINDArray. add(INDArray other)Element-wise copy addition of two NDArraysINDArrayINDArray. add(INDArray other, INDArray result)Element-wise copy addition of two NDArraysINDArrayBaseNDArray. addColumnVector(INDArray columnVector)INDArrayINDArray. addColumnVector(INDArray columnVector)Addition of a column vector (copy)INDArrayBaseNDArray. addi(Number n, INDArray result)INDArrayBaseNDArray. addi(INDArray other)INDArrayBaseNDArray. addi(INDArray other, INDArray result)INDArrayINDArray. addi(Number n, INDArray result)In place additionINDArrayINDArray. addi(INDArray other)in place (element wise) addition of two NDArraysINDArrayINDArray. addi(INDArray other, INDArray result)in place (element wise) addition of two NDArraysINDArrayBaseNDArray. addiColumnVector(INDArray columnVector)INDArrayINDArray. addiColumnVector(INDArray columnVector)In place addition of a column vectorINDArrayBaseNDArray. addiRowVector(INDArray rowVector)INDArrayINDArray. addiRowVector(INDArray rowVector)In place addition of a row vectorINDArrayBaseNDArray. addRowVector(INDArray rowVector)INDArrayINDArray. addRowVector(INDArray rowVector)Addition of a row vector (copy)protected voidBaseNDArray. assertSlice(INDArray put, long slice)INDArrayBaseNDArray. assign(INDArray arr)INDArrayINDArray. assign(INDArray arr)Assign all of the elements in the given ndarray to this ndarrayINDArrayBaseNDArray. assignIf(INDArray arr, Condition condition)INDArrayINDArray. assignIf(INDArray arr, Condition condition)Assign all elements from given ndarray that are matching given condition, ndarray to this ndarrayINDArrayBaseNDArray. broadcast(INDArray result)INDArrayINDArray. broadcast(INDArray result)Broadcasts this ndarray to be the specified shapedoubleBaseNDArray. distance1(INDArray other)doubleINDArray. distance1(INDArray other)Returns the (1-norm) distance.doubleBaseNDArray. distance2(INDArray other)doubleINDArray. distance2(INDArray other)Returns the (euclidean) distance.INDArrayBaseNDArray. div(Number n, INDArray result)INDArrayBaseNDArray. div(INDArray other)INDArrayBaseNDArray. div(INDArray other, INDArray result)INDArrayINDArray. div(Number n, INDArray result)Division if ndarray by numberINDArrayINDArray. div(INDArray other)Copy (element wise) division of two NDArraysINDArrayINDArray. div(INDArray other, INDArray result)copy (element wise) division of two NDArraysINDArrayBaseNDArray. divColumnVector(INDArray columnVector)INDArrayINDArray. divColumnVector(INDArray columnVector)Division of a column vector (copy)INDArrayBaseNDArray. divi(Number n, INDArray result)INDArrayBaseNDArray. divi(INDArray other)INDArrayBaseNDArray. divi(INDArray other, INDArray result)INDArrayINDArray. divi(Number n, INDArray result)In place division of this ndarrayINDArrayINDArray. divi(INDArray other)in place (element wise) division of two NDArraysINDArrayINDArray. divi(INDArray other, INDArray result)in place (element wise) division of two NDArraysINDArrayBaseNDArray. diviColumnVector(INDArray columnVector)INDArrayINDArray. diviColumnVector(INDArray columnVector)In place division of a column vectorINDArrayBaseNDArray. diviRowVector(INDArray rowVector)INDArrayINDArray. diviRowVector(INDArray rowVector)In place division of a row vectorINDArrayBaseNDArray. divRowVector(INDArray rowVector)INDArrayINDArray. divRowVector(INDArray rowVector)Division of a row vector (copy)protected INDArrayBaseNDArray. doColumnWise(INDArray columnVector, char operation)Do a row wise op (a,s,m,d) a : add s : subtract m : multiply d : divide h : reverse subtraction t : reverse divisionprotected INDArrayBaseNDArray. doRowWise(INDArray rowVector, char operation)Do a row wise op (a,s,m,d) a : add s : subtract m : multiply d : divide h : reverse subtraction t : reverse divisionINDArrayBaseNDArray. eps(INDArray other)INDArrayINDArray. eps(INDArray other)Returns the binary ndarray for "Epsilon equals" comparison.INDArrayBaseNDArray. eq(INDArray other)INDArrayINDArray. eq(INDArray other)Returns the binary ndarray for "Equals" comparison.booleanBaseNDArray. equalShapes(@NonNull INDArray other)booleanINDArray. equalShapes(INDArray other)This method checks 2 INDArrays for equal shapes.
Shapes are considered equal if:
(a) Both arrays have equal rank, and
(b) size(0)...size(rank()-1) are equal for both arraysINDArrayBaseNDArray. fmod(Number denominator, INDArray result)INDArrayBaseNDArray. fmod(INDArray denominator)INDArrayBaseNDArray. fmod(INDArray denominator, INDArray result)INDArrayINDArray. fmod(Number denominator, INDArray result)remainder of division by scalar.INDArrayINDArray. fmod(INDArray denominator)remainder of divisionINDArrayINDArray. fmod(INDArray denominator, INDArray result)remainder of divisionINDArrayBaseNDArray. fmodi(INDArray denominator)INDArrayINDArray. fmodi(INDArray denominator)In place fmodINDArrayBaseNDArray. get(INDArray indices)INDArrayINDArray. get(INDArray indices)Get the elements from this ndarray based on the specified indicesprotected doubleBaseNDArray. getPercentile(Number quantile, INDArray sorted)INDArrayBaseNDArray. getWhere(INDArray comp, Condition condition)INDArrayINDArray. getWhere(INDArray comp, Condition condition)Boolean indexing: Return the element if it fulfills the condition in result arrayINDArrayBaseNDArray. gt(INDArray other)INDArrayINDArray. gt(INDArray other)Returns the binary ndarray for "Greater Than" comparison.INDArrayBaseNDArray. lt(INDArray other)INDArrayINDArray. lt(INDArray other)Returns the binary ndarray for "Less" comparison.INDArrayBaseNDArray. match(INDArray comp, Condition condition)INDArrayINDArray. match(INDArray comp, Condition condition)Return a mask on whether each element matches the given conditionINDArrayBaseNDArray. mean(@NonNull INDArray result, boolean keepDims, int... dimension)INDArrayBaseNDArray. mean(@NonNull INDArray result, int... dimension)INDArrayINDArray. mean(INDArray result, boolean keepDims, int... dimension)Returns the overall mean of this ndarrayINDArrayINDArray. mean(INDArray result, int... dimension)Returns the overall mean of this ndarrayINDArrayBaseNDArray. mmul(INDArray other)INDArrayBaseNDArray. mmul(INDArray other, char resultOrder)INDArrayBaseNDArray. mmul(INDArray other, MMulTranspose mMulTranspose)INDArrayBaseNDArray. mmul(INDArray other, INDArray result)Perform an copy matrix multiplicationINDArrayBaseNDArray. mmul(INDArray other, INDArray result, MMulTranspose mMulTranspose)INDArrayINDArray. mmul(INDArray other)Perform a copy matrix multiplicationINDArrayINDArray. mmul(INDArray other, char resultOrder)Perform a copy matrix multiplicationINDArrayINDArray. mmul(INDArray other, MMulTranspose mMulTranspose)Perform a copy matrix multiplicationINDArrayINDArray. mmul(INDArray other, INDArray result)Perform an copy matrix multiplicationINDArrayINDArray. mmul(INDArray other, INDArray result, MMulTranspose mMulTranspose)Perform an copy matrix multiplicationINDArrayBaseNDArray. mmuli(INDArray other)INDArrayBaseNDArray. mmuli(INDArray other, MMulTranspose transpose)INDArrayBaseNDArray. mmuli(INDArray other, INDArray result)INDArrayBaseNDArray. mmuli(INDArray other, INDArray result, MMulTranspose transpose)INDArrayINDArray. mmuli(INDArray other)Perform an inplace matrix multiplicationINDArrayINDArray. mmuli(INDArray other, MMulTranspose transpose)Perform an copy matrix multiplicationINDArrayINDArray. mmuli(INDArray other, INDArray result)Perform an inplace matrix multiplicationINDArrayINDArray. mmuli(INDArray other, INDArray result, MMulTranspose transpose)Perform an in place matrix multiplicationINDArrayBaseNDArray. mul(Number n, INDArray result)INDArrayBaseNDArray. mul(INDArray other)INDArrayBaseNDArray. mul(INDArray other, INDArray result)INDArrayINDArray. mul(Number n, INDArray result)Multiplication of ndarray.INDArrayINDArray. mul(INDArray other)copy (element wise) multiplication of two NDArraysINDArrayINDArray. mul(INDArray other, INDArray result)copy (element wise) multiplication of two NDArraysINDArrayBaseNDArray. mulColumnVector(INDArray columnVector)INDArrayINDArray. mulColumnVector(INDArray columnVector)Multiplication of a column vector (copy)INDArrayBaseNDArray. muli(Number n, INDArray result)INDArrayBaseNDArray. muli(INDArray other)INDArrayBaseNDArray. muli(INDArray other, INDArray result)INDArrayINDArray. muli(Number n, INDArray result)In place multiplication of this ndarrayINDArrayINDArray. muli(INDArray other)in place (element wise) multiplication of two NDArraysINDArrayINDArray. muli(INDArray other, INDArray result)in place (element wise) multiplication of two NDArraysINDArrayBaseNDArray. muliColumnVector(INDArray columnVector)INDArrayINDArray. muliColumnVector(INDArray columnVector)In place multiplication of a column vectorINDArrayBaseNDArray. muliRowVector(INDArray rowVector)INDArrayINDArray. muliRowVector(INDArray rowVector)In place multiplication of a row vectorINDArrayBaseNDArray. mulRowVector(INDArray rowVector)INDArrayINDArray. mulRowVector(INDArray rowVector)Multiplication of a row vector (copy)INDArrayBaseNDArray. neq(INDArray other)INDArrayINDArray. neq(INDArray other)Returns the binary ndarray for "Not equals" comparison.INDArrayBaseNDArray. put(int[] indices, INDArray element)INDArrayBaseNDArray. put(int i, int j, INDArray element)INDArrayBaseNDArray. put(int i, INDArray element)INDArrayBaseNDArray. put(INDArray indices, INDArray element)INDArrayBaseNDArray. put(INDArrayIndex[] indices, INDArray element)INDArrayINDArray. put(int[] indices, INDArray element)Inserts the element at the specified indexINDArrayINDArray. put(int i, int j, INDArray element)Inserts the element at the specified indexINDArrayINDArray. put(int i, INDArray element)Inserts the element at the specified indexINDArrayINDArray. put(INDArray indices, INDArray element)Put element in to the indices denoted by the indices ndarray.INDArrayINDArray. put(INDArrayIndex[] indices, INDArray element)Put the elements of the ndarray in to the specified indicesINDArrayBaseNDArray. putColumn(int column, INDArray toPut)INDArrayINDArray. putColumn(int column, INDArray toPut)Insert a column in to this array Will throw an exception if this ndarray is not a matrixINDArrayBaseNDArray. putiColumnVector(INDArray columnVector)INDArrayINDArray. putiColumnVector(INDArray columnVector)In place assignment of a column vectorINDArrayBaseNDArray. putiRowVector(INDArray rowVector)INDArrayINDArray. putiRowVector(INDArray rowVector)in place assignment of row vector, to each row of this arrayINDArrayBaseNDArray. putRow(long row, INDArray toPut)INDArrayINDArray. putRow(long row, INDArray toPut)Insert a row in to this array Will throw an exception if this ndarray is not a matrixINDArrayBaseNDArray. putSlice(int slice, INDArray put)INDArrayINDArray. putSlice(int slice, INDArray put)Assigns the given matrix (put) to the specified sliceINDArrayBaseNDArray. putWhere(Number comp, INDArray put, Condition condition)INDArrayBaseNDArray. putWhere(INDArray comp, INDArray put, Condition condition)INDArrayINDArray. putWhere(Number comp, INDArray put, Condition condition)Assign the element according to the comparison arrayINDArrayINDArray. putWhere(INDArray comp, INDArray put, Condition condition)Assign the element according to the comparison arrayINDArrayBaseNDArray. putWhereWithMask(INDArray mask, Number put)INDArrayBaseNDArray. putWhereWithMask(INDArray mask, INDArray put)INDArrayINDArray. putWhereWithMask(INDArray mask, Number put)Use a pre computed mask for assigning arraysINDArrayINDArray. putWhereWithMask(INDArray mask, INDArray put)Use a pre computed mask for assigning arraysINDArrayBaseNDArray. rdiv(Number n, INDArray result)INDArrayBaseNDArray. rdiv(INDArray other)INDArrayBaseNDArray. rdiv(INDArray other, INDArray result)INDArrayINDArray. rdiv(Number n, INDArray result)Reverse division (number / ndarray)INDArrayINDArray. rdiv(INDArray other)Reverse division, elements wise.INDArrayINDArray. rdiv(INDArray other, INDArray result)Reverse divisionINDArrayBaseNDArray. rdivColumnVector(INDArray columnVector)INDArrayINDArray. rdivColumnVector(INDArray columnVector)Reverse division of a column vector (copy)INDArrayBaseNDArray. rdivi(Number n, INDArray result)INDArrayBaseNDArray. rdivi(INDArray other)INDArrayBaseNDArray. rdivi(INDArray other, INDArray result)INDArrayINDArray. rdivi(Number n, INDArray result)Reverse in place divisionINDArrayINDArray. rdivi(INDArray other)Reverse divsion (in place).INDArrayINDArray. rdivi(INDArray other, INDArray result)Reverse division (in-place)INDArrayBaseNDArray. rdiviColumnVector(INDArray columnVector)INDArrayINDArray. rdiviColumnVector(INDArray columnVector)In place reverse divison of a column vectorINDArrayBaseNDArray. rdiviRowVector(INDArray rowVector)INDArrayINDArray. rdiviRowVector(INDArray rowVector)In place reverse division of a column vectorINDArrayBaseNDArray. rdivRowVector(INDArray rowVector)INDArrayINDArray. rdivRowVector(INDArray rowVector)Reverse division of a column vector (copy)INDArrayBaseNDArray. remainder(Number denominator, INDArray result)INDArrayBaseNDArray. remainder(INDArray denominator)INDArrayBaseNDArray. remainder(INDArray denominator, INDArray result)INDArrayINDArray. remainder(Number denominator, INDArray result)The scalar remainderINDArrayINDArray. remainder(INDArray denominator)Remainder operatorINDArrayINDArray. remainder(INDArray denominator, INDArray result)Remainder operatorINDArrayBaseNDArray. remainderi(INDArray denominator)INDArrayINDArray. remainderi(INDArray denominator)In place remainderINDArrayBaseNDArray. replaceWhere(INDArray arr, Condition condition)INDArrayINDArray. replaceWhere(INDArray arr, Condition condition)Replaces all elements in this ndarray that are matching give condition, with corresponding elements from given arrayINDArrayBaseNDArray. rsub(Number n, INDArray result)INDArrayBaseNDArray. rsub(INDArray other)INDArrayBaseNDArray. rsub(INDArray other, INDArray result)INDArrayINDArray. rsub(Number n, INDArray result)Reverse subtractionINDArrayINDArray. rsub(INDArray other)Element-wise reverse subtraction (copy op).INDArrayINDArray. rsub(INDArray other, INDArray result)Reverse subtractionINDArrayBaseNDArray. rsubColumnVector(INDArray columnVector)INDArrayINDArray. rsubColumnVector(INDArray columnVector)Reverse subtraction of a column vector (copy)INDArrayBaseNDArray. rsubi(Number n, INDArray result)INDArrayBaseNDArray. rsubi(INDArray other)INDArrayBaseNDArray. rsubi(INDArray other, INDArray result)INDArrayINDArray. rsubi(Number n, INDArray result)Reverse in place subtractionINDArrayINDArray. rsubi(INDArray other)Element-wise reverse subtraction (in the place op) - i.e., other - thisINDArrayINDArray. rsubi(INDArray other, INDArray result)Reverse subtraction (in-place)INDArrayBaseNDArray. rsubiColumnVector(INDArray columnVector)INDArrayINDArray. rsubiColumnVector(INDArray columnVector)In place reverse subtraction of a column vectorINDArrayBaseNDArray. rsubiRowVector(INDArray rowVector)INDArrayINDArray. rsubiRowVector(INDArray rowVector)In place reverse subtraction of a row vectorINDArrayBaseNDArray. rsubRowVector(INDArray rowVector)INDArrayINDArray. rsubRowVector(INDArray rowVector)Reverse subtraction of a row vector (copy)doubleBaseNDArray. squaredDistance(INDArray other)doubleINDArray. squaredDistance(INDArray other)Returns the square of the Euclidean distance.INDArrayBaseNDArray. sub(Number n, INDArray result)INDArrayBaseNDArray. sub(INDArray other)INDArrayBaseNDArray. sub(INDArray other, INDArray result)INDArrayINDArray. sub(Number n, INDArray result)Subtraction of this ndarrayINDArrayINDArray. sub(INDArray other)copy subtraction of two NDArraysINDArrayINDArray. sub(INDArray other, INDArray result)copy subtraction of two NDArraysINDArrayBaseNDArray. subColumnVector(INDArray columnVector)INDArrayINDArray. subColumnVector(INDArray columnVector)Subtraction of a column vector (copy)INDArrayBaseNDArray. subi(Number n, INDArray result)INDArrayBaseNDArray. subi(INDArray other)INDArrayBaseNDArray. subi(INDArray other, INDArray result)in place subtraction of two matricesINDArrayINDArray. subi(Number n, INDArray result)In place subtraction of this ndarrayINDArrayINDArray. subi(INDArray other)in place (element wise) subtraction of two NDArraysINDArrayINDArray. subi(INDArray other, INDArray result)in place (element wise) subtraction of two NDArraysINDArrayBaseNDArray. subiColumnVector(INDArray columnVector)INDArrayINDArray. subiColumnVector(INDArray columnVector)In place subtraction of a column vectorINDArrayBaseNDArray. subiRowVector(INDArray rowVector)INDArrayINDArray. subiRowVector(INDArray rowVector)In place subtraction of a row vectorINDArrayBaseNDArray. subRowVector(INDArray rowVector)INDArrayINDArray. subRowVector(INDArray rowVector)Subtraction of a row vector (copy)INDArrayBaseNDArray. sum(@NonNull INDArray result, boolean keepDims, int... dimension)INDArrayBaseNDArray. sum(@NonNull INDArray result, int... dimension)INDArrayINDArray. sum(INDArray result, boolean keepDims, int... dimension)Returns the sum along the last dimension of this ndarrayINDArrayINDArray. sum(INDArray result, int... dimension)Returns the sum along the last dimension of this ndarrayMethod parameters in org.nd4j.linalg.api.ndarray with type arguments of type INDArray Modifier and Type Method Description voidBaseNDArray. sliceVectors(List<INDArray> list)voidINDArray. sliceVectors(List<INDArray> list)Flattens the array for linear indexing in list.Constructors in org.nd4j.linalg.api.ndarray with parameters of type INDArray Constructor Description BaseNDArrayProxy(INDArray anInstance)Constructor parameters in org.nd4j.linalg.api.ndarray with type arguments of type INDArray Constructor Description BaseNDArray(List<INDArray> slices, int[] shape)Create an ndarray from the specified slices.BaseNDArray(List<INDArray> slices, int[] shape, char ordering)Create an ndarray from the specified slices.BaseNDArray(List<INDArray> slices, int[] shape, int[] stride)Create an ndarray from the specified slices.BaseNDArray(List<INDArray> slices, int[] shape, int[] stride, char ordering)Create an ndarray from the specified slices.BaseNDArray(List<INDArray> slices, long[] shape)BaseNDArray(List<INDArray> slices, long[] shape, char ordering)BaseNDArray(List<INDArray> slices, long[] shape, long[] stride)BaseNDArray(List<INDArray> slices, long[] shape, long[] stride, char ordering) -
Uses of INDArray in org.nd4j.linalg.api.ops
Fields in org.nd4j.linalg.api.ops declared as INDArray Modifier and Type Field Description protected INDArrayBaseOp. dimensionzprotected INDArrayBaseOp. xprotected INDArrayBaseOp. yprotected INDArrayBaseOp. zFields in org.nd4j.linalg.api.ops with type parameters of type INDArray Modifier and Type Field Description protected Map<Integer,INDArray>BaseOpContext. fastpath_inprotected Map<Integer,INDArray>BaseOpContext. fastpath_outprotected List<INDArray>DynamicCustomOp. inputArgumentsprotected List<INDArray>DynamicCustomOp. outputArgumentsMethods in org.nd4j.linalg.api.ops that return INDArray Modifier and Type Method Description INDArrayBaseOp. dimensions()INDArrayBaseReduceSameOp. dimensions()INDArrayBroadcastOp. dimensions()INDArrayIndexAccumulation. dimensions()This method returns dimensions for this opINDArrayReduceOp. dimensions()This method returns dimensions for this opINDArrayScalarOp. dimensions()This method returns target dimensions for this opINDArrayDynamicCustomOp. generateFake(long... shape)Generate fake data forDynamicCustomOp.computeArrays()of the given shape with the data typeNd4j.defaultFloatingPointType()INDArrayDynamicCustomOp. generateFake(DataType dataType, long... shape)Generate fake data forDynamicCustomOp.computeArrays()of the the given shape with the given data typeINDArrayBaseOp. getInputArgument(int index)INDArrayCustomOp. getInputArgument(int index)INDArrayDynamicCustomOp. getInputArgument(int index)INDArrayBaseOpContext. getInputArray(int idx)INDArrayOpContext. getInputArray(int idx)INDArrayCustomOp. getOutputArgument(int index)INDArrayDynamicCustomOp. getOutputArgument(int index)INDArrayBaseOpContext. getOutputArray(int i)INDArrayOpContext. getOutputArray(int i)INDArrayLossFunction. input()The trueINDArrayBaseReduceOp. noOp()INDArrayReduceOp. noOp()Returns the no op version of the input Basically when a reduce can't happen (eg: sum(0) on a row vector) you have a no op state for a given reduction.INDArrayLossFunction. output()The guessINDArrayBaseScalarBoolOp. scalar()INDArrayBaseScalarOp. scalar()INDArrayScalarOp. scalar()The normal scalarprotected static INDArray[]DynamicCustomOp. wrapOrNull(INDArray in)INDArrayBaseOp. x()INDArrayOp. x()The origin ndarrayINDArrayBaseOp. y()INDArrayOp. y()The pairwise op ndarrayINDArrayBaseOp. z()INDArrayBaseScalarBoolOp. z()INDArrayBaseScalarOp. z()INDArrayBaseTransformOp. z()INDArrayOp. z()The resulting ndarrayMethods in org.nd4j.linalg.api.ops that return types with arguments of type INDArray Modifier and Type Method Description List<INDArray>BaseOpContext. getInputArrays()List<INDArray>OpContext. getInputArrays()This method returns List of input arrays defined within this contextList<INDArray>BaseOpContext. getOutputArrays()List<INDArray>OpContext. getOutputArrays()This method returns List of output arrays defined within this contextList<INDArray>CustomOp. inputArguments()List<INDArray>DynamicCustomOp. inputArguments()List<INDArray>CustomOp. outputArguments()List<INDArray>DynamicCustomOp. outputArguments()Methods in org.nd4j.linalg.api.ops with parameters of type INDArray Modifier and Type Method Description voidCustomOp. addInputArgument(INDArray... arg)voidDynamicCustomOp. addInputArgument(INDArray... arg)DynamicCustomOp.DynamicCustomOpsBuilderDynamicCustomOp.DynamicCustomOpsBuilder. addInputs(INDArray... inputs)This method takes arbitrary number of input INDArrays in, as Op input Note that this ACCUMULATES arguments.voidCustomOp. addOutputArgument(INDArray... arg)voidDynamicCustomOp. addOutputArgument(INDArray... arg)DynamicCustomOp.DynamicCustomOpsBuilderDynamicCustomOp.DynamicCustomOpsBuilder. addOutputs(INDArray... outputs)This method takes arbitrary number of output INDArrays in, to store operation result Note that this ACCUMULATES arguments.voidCustomOp. removeInputArgument(INDArray arg)voidDynamicCustomOp. removeInputArgument(INDArray arg)voidCustomOp. removeOutputArgument(INDArray arg)voidDynamicCustomOp. removeOutputArgument(INDArray arg)voidBaseOpContext. setArgs(INDArray[] inputArrs, long[] iArgs, DataType[] dArgs, double[] tArgs, boolean[] bArgs)voidOpContext. setArgs(INDArray[] inputArrs, long[] iArgs, DataType[] dArgs, double[] tArgs, boolean[] bArgs)set context argumentsvoidDynamicCustomOp. setInputArgument(int index, INDArray input)voidDynamicCustomOp. setInputArguments(INDArray... inputs)voidBaseOpContext. setInputArray(int index, @NonNull INDArray array)voidOpContext. setInputArray(int index, INDArray array)This method adds INDArray as input argument for future op callvoidBaseOpContext. setInputArrays(INDArray... arrays)voidOpContext. setInputArrays(INDArray... arrays)This method sets provided arrays as input arraysvoidDynamicCustomOp. setOutputArgument(int index, INDArray output)voidBaseOpContext. setOutputArray(int index, @NonNull INDArray array)voidOpContext. setOutputArray(int index, INDArray array)This method adds INDArray as output for future op callvoidBaseOpContext. setOutputArrays(INDArray... arrays)voidOpContext. setOutputArrays(INDArray... arrays)This method sets provided arrays as output arraysvoidBaseScalarBoolOp. setScalar(INDArray scalar)voidBaseScalarOp. setScalar(INDArray scalar)voidScalarOp. setScalar(INDArray scalar)voidBaseOp. setX(INDArray x)voidOp. setX(INDArray x)set x (the input ndarray)voidBaseOp. setY(INDArray y)voidOp. setY(INDArray y)set y(the pairwise ndarray)voidBaseOp. setZ(INDArray z)voidOp. setZ(INDArray z)set z (the solution ndarray)protected static INDArray[]DynamicCustomOp. wrapOrNull(INDArray in)Method parameters in org.nd4j.linalg.api.ops with type arguments of type INDArray Modifier and Type Method Description voidBaseOpContext. setInputArrays(@NonNull List<INDArray> arrays)voidOpContext. setInputArrays(List<INDArray> arrays)This method sets provided arrays as input arraysvoidBaseOpContext. setOutputArrays(@NonNull List<INDArray> arrays)voidOpContext. setOutputArrays(List<INDArray> arrays)This method sets provided arrays as output arrays -
Uses of INDArray in org.nd4j.linalg.api.ops.aggregates
Fields in org.nd4j.linalg.api.ops.aggregates with type parameters of type INDArray Modifier and Type Field Description protected List<INDArray>BaseAggregate. argumentsMethods in org.nd4j.linalg.api.ops.aggregates that return types with arguments of type INDArray Modifier and Type Method Description List<INDArray>Aggregate. getArguments()List<INDArray>BaseAggregate. getArguments() -
Uses of INDArray in org.nd4j.linalg.api.ops.aggregates.impl
Constructors in org.nd4j.linalg.api.ops.aggregates.impl with parameters of type INDArray Constructor Description AggregateAxpy(@NonNull INDArray x, @NonNull INDArray y, double alpha)Deprecated.AggregateGEMM(int Order, int TransA, int TransB, int M, int N, int K, double alpha, @NonNull INDArray A, int lda, @NonNull INDArray B, int ldb, double beta, @NonNull INDArray C, int ldc) -
Uses of INDArray in org.nd4j.linalg.api.ops.compat
Constructors in org.nd4j.linalg.api.ops.compat with parameters of type INDArray Constructor Description CompatSparseToDense(INDArray indices, INDArray shape, INDArray values)CompatSparseToDense(INDArray indices, INDArray shape, INDArray values, INDArray defaultValue)CompatStringSplit(INDArray strings, INDArray delimiter)CompatStringSplit(INDArray strings, INDArray delimiter, INDArray indices, INDArray values) -
Uses of INDArray in org.nd4j.linalg.api.ops.compression
Constructors in org.nd4j.linalg.api.ops.compression with parameters of type INDArray Constructor Description DecodeBitmap(@NonNull INDArray encoded, @NonNull INDArray updates)DecodeThreshold(@NonNull INDArray encoded, @NonNull INDArray updates)EncodeBitmap(@NonNull INDArray updates, float threshold)EncodeBitmap(@NonNull INDArray updates, @NonNull INDArray encoded, @NonNull INDArray counter, float threshold)EncodeThreshold(@NonNull INDArray updates, float threshold)EncodeThreshold(@NonNull INDArray updates, float threshold, @NonNull Integer boundary)EncodeThreshold(@NonNull INDArray updates, @NonNull INDArray encoded, float threshold, @NonNull Integer boundary) -
Uses of INDArray in org.nd4j.linalg.api.ops.custom
Methods in org.nd4j.linalg.api.ops.custom that return INDArray Modifier and Type Method Description INDArrayBarnesHutSymmetrize. getSymmetrizedCols()INDArrayBarnesHutSymmetrize. getSymmetrizedValues()Method parameters in org.nd4j.linalg.api.ops.custom with type arguments of type INDArray Modifier and Type Method Description static ExecutionResultInvoke. doInvoke(DifferentialFunction op, Map<String,INDArray> placeHolders, Map<String,SDValue> valuePlaceHolders)Perform the invoke method.Constructors in org.nd4j.linalg.api.ops.custom with parameters of type INDArray Constructor Description AdjustContrast(@NonNull INDArray in, double factor)AdjustContrast(@NonNull INDArray in, double factor, INDArray out)AdjustHue(@NonNull INDArray in, double delta)AdjustHue(@NonNull INDArray in, double delta, INDArray out)AdjustSaturation(@NonNull INDArray in, double factor)AdjustSaturation(@NonNull INDArray in, double factor, INDArray out)BarnesEdgeForces(INDArray rowP, INDArray colP, INDArray valP, INDArray dataP, long N, INDArray output)BarnesHutGains(INDArray output, INDArray input, INDArray gradx, INDArray epsilon)BarnesHutSymmetrize(INDArray rowP, INDArray colP, INDArray valP, long N, INDArray outRows)BetaInc(@NonNull INDArray a_input, @NonNull INDArray b_input, @NonNull INDArray x_input)BetaInc(@NonNull INDArray a_input, @NonNull INDArray b_input, @NonNull INDArray x_input, INDArray output)BitCast(INDArray in, int dataType)BitCast(INDArray in, int dataType, INDArray out)BitCast(INDArray in, DataType dataType)BitCast(INDArray in, DataType dataType, INDArray out)CompareAndBitpack(INDArray in, double threshold)CompareAndBitpack(INDArray in, double threshold, INDArray out)Digamma(@NonNull INDArray x)DivideNoNan(INDArray in1, INDArray in2)DivideNoNan(INDArray in1, INDArray in2, INDArray out)DrawBoundingBoxes(INDArray images, INDArray boxes, INDArray colors)DrawBoundingBoxes(INDArray images, INDArray boxes, INDArray colors, INDArray output)Eig(INDArray input)Eig(INDArray[] inputs, INDArray[] outputs)Eig(INDArray[] inputs, INDArray[] outputs, List<Double> tArguments, int[] iArguments)Eig(INDArray[] inputs, INDArray[] outputs, List<Double> tArguments, List<Integer> iArguments)FakeQuantWithMinMaxVarsPerChannel(INDArray x, INDArray min, INDArray max)FakeQuantWithMinMaxVarsPerChannel(INDArray x, INDArray min, INDArray max, boolean narrow)FakeQuantWithMinMaxVarsPerChannel(INDArray x, INDArray min, INDArray max, int num_bits)FakeQuantWithMinMaxVarsPerChannel(INDArray x, INDArray min, INDArray max, int num_bits, boolean narrow)Flatten(char order, INDArray... inputs)Flatten(INDArray[] inputs, String order)Flatten(INDArray input, String order)Flatten(INDArray output, INDArray... inputs)FusedBatchNorm(@NonNull INDArray x, @NonNull INDArray scale, @NonNull INDArray offset, int dataFormat, int isTraining, INDArray yOut, INDArray batchMeanOut, INDArray batchMeanVar)HsvToRgb(INDArray input)Igamma(@NonNull INDArray n, @NonNull INDArray x)Igamma(@NonNull INDArray n, @NonNull INDArray x, INDArray output)Igammac(@NonNull INDArray n, @NonNull INDArray x)Igammac(@NonNull INDArray n, @NonNull INDArray x, INDArray output)KnnMinDistance(INDArray point, INDArray lowest, INDArray highest, INDArray distance)Lgamma(@NonNull INDArray x)Lgamma(@NonNull INDArray x, INDArray output)LinearSolve(INDArray a, INDArray b)LinearSolve(INDArray a, INDArray b, boolean adjoint)Logdet(INDArray input)Lstsq(@NonNull INDArray matrix, @NonNull INDArray rhs)Lstsq(@NonNull INDArray matrix, @NonNull INDArray rhs, double l2_regularizer, boolean fast)Lu(INDArray input)MatrixBandPart(@NonNull INDArray input, int minLower, int maxUpper)Polygamma(@NonNull INDArray n, @NonNull INDArray x)Polygamma(@NonNull INDArray n, @NonNull INDArray x, INDArray output)RandomCrop(@NonNull INDArray input, @NonNull INDArray shape)RgbToGrayscale(INDArray image)RgbToHsv(INDArray input)RgbToYiq(INDArray input)RgbToYuv(INDArray input)Roll(@NonNull INDArray input, int shift)Roll(@NonNull INDArray input, @NonNull INDArray shifts, @NonNull INDArray axes)SpTreeCell(INDArray corner, INDArray width, INDArray point, long N, boolean contains)ToggleBits(@NonNull INDArray input)ToggleBits(@NonNull INDArray input, INDArray output)TriangularSolve(INDArray matrix, INDArray rhs, boolean lower, boolean adjoint)Triu(INDArray input, int diag)YiqToRgb(INDArray input)YuvToRgb(INDArray input) -
Uses of INDArray in org.nd4j.linalg.api.ops.executioner
Methods in org.nd4j.linalg.api.ops.executioner that return INDArray Modifier and Type Method Description INDArray[]DefaultOpExecutioner. allocateOutputArrays(CustomOp op)INDArray[]OpExecutioner. allocateOutputArrays(CustomOp op)Equivalent to calliINDArrayDefaultOpExecutioner. bitmapDecode(INDArray encoded, INDArray target)INDArrayOpExecutioner. bitmapDecode(INDArray encoded, INDArray target)INDArrayDefaultOpExecutioner. bitmapEncode(INDArray indArray, double threshold)INDArrayOpExecutioner. bitmapEncode(INDArray indArray, double threshold)abstract INDArrayDefaultOpExecutioner. exec(BroadcastOp broadcast)INDArray[]DefaultOpExecutioner. exec(CustomOp op)INDArray[]DefaultOpExecutioner. exec(CustomOp op, OpContext context)abstract INDArrayDefaultOpExecutioner. exec(Variance accumulation)abstract INDArrayDefaultOpExecutioner. exec(IndexAccumulation op)abstract INDArrayDefaultOpExecutioner. exec(Op op)abstract INDArrayDefaultOpExecutioner. exec(Op op, OpContext opContext)INDArrayDefaultOpExecutioner. exec(RandomOp op)This method executes specified RandomOp using default RNG available via Nd4j.getRandom()abstract INDArrayDefaultOpExecutioner. exec(RandomOp op, Random rng)This method executes specific RandomOp against specified RNGabstract INDArrayDefaultOpExecutioner. exec(ReduceOp op)abstract INDArrayDefaultOpExecutioner. exec(ScalarOp op)INDArrayOpExecutioner. exec(BroadcastOp broadcast)Execute a broadcast op, possibly along one or more dimensionsINDArray[]OpExecutioner. exec(CustomOp op)INDArray[]OpExecutioner. exec(CustomOp op, OpContext context)This method executes op with given contextINDArrayOpExecutioner. exec(Variance accumulation)Execute an variance accumulation op, possibly along one or more dimensionsINDArrayOpExecutioner. exec(IndexAccumulation indexAccum)Execute an index accumulation along one or more dimensionsINDArrayOpExecutioner. exec(Op op)Execute the operationINDArrayOpExecutioner. exec(Op op, OpContext opContext)Execute the operationINDArrayOpExecutioner. exec(RandomOp op)This method executes specified RandomOp using default RNG available via Nd4j.getRandom()INDArrayOpExecutioner. exec(RandomOp op, Random rng)This method executes specific RandomOp against specified RNGINDArrayOpExecutioner. exec(ReduceOp reduceOp)Execute a reduceOp, possibly along one or more dimensionsINDArrayOpExecutioner. exec(ScalarOp broadcast)Execute ScalarOpINDArrayDefaultOpExecutioner. getX(Op op, OpContext oc)INDArrayDefaultOpExecutioner. getY(Op op, OpContext oc)INDArrayDefaultOpExecutioner. getZ(Op op, OpContext oc)INDArrayDefaultOpExecutioner. thresholdDecode(INDArray encoded, INDArray target)INDArrayOpExecutioner. thresholdDecode(INDArray encoded, INDArray target)This method decodes thresholds array, and puts it into target arrayINDArrayDefaultOpExecutioner. thresholdEncode(INDArray input, double threshold)INDArrayDefaultOpExecutioner. thresholdEncode(INDArray input, double threshold, Integer boundary)INDArrayOpExecutioner. thresholdEncode(INDArray input, double threshold)This method encodes array as thresholds, updating input array at the same timeINDArrayOpExecutioner. thresholdEncode(INDArray input, double threshold, Integer boundary)This method encodes array as thresholds, updating input array at the same timeMethods in org.nd4j.linalg.api.ops.executioner that return types with arguments of type INDArray Modifier and Type Method Description Map<String,INDArray>DefaultOpExecutioner. executeGraph(long id, Map<String,INDArray> map, Map<String,Integer> reverseMap)Map<String,INDArray>OpExecutioner. executeGraph(long id, Map<String,INDArray> map, Map<String,Integer> reverseMap)Methods in org.nd4j.linalg.api.ops.executioner with parameters of type INDArray Modifier and Type Method Description StringDefaultOpExecutioner. arrayInfo(INDArray arr)INDArrayDefaultOpExecutioner. bitmapDecode(INDArray encoded, INDArray target)INDArrayOpExecutioner. bitmapDecode(INDArray encoded, INDArray target)INDArrayDefaultOpExecutioner. bitmapEncode(INDArray indArray, double threshold)longDefaultOpExecutioner. bitmapEncode(INDArray indArray, INDArray target, double threshold)INDArrayOpExecutioner. bitmapEncode(INDArray indArray, double threshold)longOpExecutioner. bitmapEncode(INDArray indArray, INDArray target, double threshold)This method returns number of elements affected by encoderstatic voidOpExecutionerUtil. checkForAny(INDArray z)static voidOpExecutionerUtil. checkForInf(INDArray z)static voidOpExecutionerUtil. checkForNaN(INDArray z)protected voidDefaultOpExecutioner. checkWorkspace(String opName, INDArray array)protected static StringDefaultOpExecutioner. firstX(INDArray array, int x)INDArrayStatisticsDefaultOpExecutioner. inspectArray(INDArray array)INDArrayStatisticsOpExecutioner. inspectArray(INDArray array)voidDefaultOpExecutioner. scatterUpdate(ScatterUpdate.UpdateOp op, INDArray array, INDArray indices, INDArray updates, int[] axis)voidOpExecutioner. scatterUpdate(ScatterUpdate.UpdateOp op, @NonNull INDArray array, @NonNull INDArray indices, @NonNull INDArray updates, int[] axis)Deprecated.voidDefaultOpExecutioner. setX(INDArray x, Op op, OpContext oc)voidDefaultOpExecutioner. setY(INDArray y, Op op, OpContext oc)voidDefaultOpExecutioner. setZ(INDArray z, Op op, OpContext oc)TadPackDefaultOpExecutioner. tadShapeInfoAndOffsets(INDArray array, int[] dimension)TadPackOpExecutioner. tadShapeInfoAndOffsets(INDArray array, int[] dimension)This method returns host/device tad buffersINDArrayDefaultOpExecutioner. thresholdDecode(INDArray encoded, INDArray target)INDArrayOpExecutioner. thresholdDecode(INDArray encoded, INDArray target)This method decodes thresholds array, and puts it into target arrayINDArrayDefaultOpExecutioner. thresholdEncode(INDArray input, double threshold)INDArrayDefaultOpExecutioner. thresholdEncode(INDArray input, double threshold, Integer boundary)INDArrayOpExecutioner. thresholdEncode(INDArray input, double threshold)This method encodes array as thresholds, updating input array at the same timeINDArrayOpExecutioner. thresholdEncode(INDArray input, double threshold, Integer boundary)This method encodes array as thresholds, updating input array at the same timestatic voidDefaultOpExecutioner. validateDataType(DataType expectedType, Object op, INDArray... operands)Method parameters in org.nd4j.linalg.api.ops.executioner with type arguments of type INDArray Modifier and Type Method Description Map<String,INDArray>DefaultOpExecutioner. executeGraph(long id, Map<String,INDArray> map, Map<String,Integer> reverseMap)Map<String,INDArray>OpExecutioner. executeGraph(long id, Map<String,INDArray> map, Map<String,Integer> reverseMap) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.broadcast
Constructors in org.nd4j.linalg.api.ops.impl.broadcast with parameters of type INDArray Constructor Description BiasAdd(@NonNull INDArray input, @NonNull INDArray bias, boolean nchw)BiasAdd(@NonNull INDArray input, @NonNull INDArray bias, INDArray output, boolean nchw)BiasAddGrad(@NonNull INDArray input, @NonNull INDArray bias, @NonNull INDArray gradient)BiasAddGrad(@NonNull INDArray input, @NonNull INDArray bias, @NonNull INDArray gradient, boolean nchw)BiasAddGrad(@NonNull INDArray input, @NonNull INDArray bias, @NonNull INDArray gradient, INDArray output)BroadcastAddOp(INDArray x, INDArray y, INDArray z, int... dimension)BroadcastAMax(INDArray x, INDArray y, INDArray z, int... dimension)BroadcastAMin(INDArray x, INDArray y, INDArray z, int... dimension)BroadcastCopyOp(INDArray x, INDArray y, INDArray z, int... dimension)BroadcastDivOp(INDArray x, INDArray y, INDArray z, int... dimension)BroadcastGradientArgs(INDArray x, INDArray y, INDArray z, int... dimension)BroadcastMax(INDArray x, INDArray y, INDArray z, int... dimension)BroadcastMin(INDArray x, INDArray y, INDArray z, int... dimension)BroadcastMulOp(INDArray x, INDArray y, INDArray z, int... dimension)BroadcastRDivOp(INDArray x, INDArray y, INDArray z, int... dimension)BroadcastRSubOp(INDArray x, INDArray y, INDArray z, int... dimension)BroadcastSubOp(INDArray x, INDArray y, INDArray z, int... dimension)BroadcastTo(@NonNull INDArray input, @lombok.NonNull long[] shape, @NonNull INDArray output)BroadcastTo(@NonNull INDArray input, @NonNull INDArray shape, @NonNull INDArray output) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.broadcast.bool
Constructors in org.nd4j.linalg.api.ops.impl.broadcast.bool with parameters of type INDArray Constructor Description BroadcastEqualTo(INDArray x, INDArray y, INDArray z, int... dimension)BroadcastGreaterThan(INDArray x, INDArray y, INDArray z, int... dimension)BroadcastGreaterThanOrEqual(INDArray x, INDArray y, INDArray z, int... dimension)BroadcastLessThan(INDArray x, INDArray y, INDArray z, int... dimension)BroadcastLessThanOrEqual(INDArray x, INDArray y, INDArray z, int... dimension)BroadcastNotEqual(INDArray x, INDArray y, INDArray z, int... dimension) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.controlflow
Constructors in org.nd4j.linalg.api.ops.impl.controlflow with parameters of type INDArray Constructor Description Select(INDArray[] inputs, INDArray[] outputs)Select(INDArray[] inputs, INDArray[] outputs, List<Double> tArguments, List<Integer> iArguments)Where(String opName, INDArray[] inputs, INDArray[] outputs, List<Double> tArguments, List<Integer> iArguments)Where(INDArray condition)Where(INDArray[] inputs, INDArray[] outputs)Where(INDArray x, INDArray condition)Where(INDArray x, INDArray y, INDArray condition)WhereNumpy(String opName, INDArray[] inputs, INDArray[] outputs, List<Double> tArguments, List<Integer> iArguments)WhereNumpy(INDArray[] inputs, INDArray[] outputs)WhereNumpy(INDArray x, INDArray y, INDArray condition) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.controlflow.compat
Constructors in org.nd4j.linalg.api.ops.impl.controlflow.compat with parameters of type INDArray Constructor Description BaseCompatOp(INDArray... inputs)Merge(INDArray... inputs)Switch(INDArray input, INDArray predicate) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.grid
Constructors in org.nd4j.linalg.api.ops.impl.grid with parameters of type INDArray Constructor Description BaseGridOp(INDArray x, INDArray y)FreeGridOp(INDArray x, INDArray y) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.image
Constructors in org.nd4j.linalg.api.ops.impl.image with parameters of type INDArray Constructor Description CropAndResize(@NonNull INDArray image, @NonNull INDArray cropBoxes, @NonNull INDArray boxIndices, @NonNull INDArray cropOutSize, @NonNull CropAndResize.Method method, double extrapolationValue, INDArray output)CropAndResize(INDArray image, INDArray cropBoxes, INDArray boxIndices, INDArray cropOutSize, double extrapolationValue)ExtractImagePatches(@NonNull INDArray input, @lombok.NonNull int[] kSizes, @lombok.NonNull int[] strides, @lombok.NonNull int[] rates, boolean sameMode)ExtractImagePatches(INDArray input, int kH, int kW, int sH, int sW, int rH, int rW, boolean sameMode)ImageResize(@NonNull INDArray in, @NonNull INDArray size, boolean preserveAspectRatio, boolean antialias, ImageResizeMethod method)ImageResize(@NonNull INDArray in, @NonNull INDArray size, double bicubicCoefficient, boolean exclude_outside, boolean preserveAspectRatio)ImageResize(@NonNull INDArray in, @NonNull INDArray size, double bicubicCoefficient, CoordinateTransformationMode coorMode, boolean exclude_outside, boolean preserveAspectRatio)ImageResize(@NonNull INDArray in, @NonNull INDArray size, CoordinateTransformationMode coorMode, NearestMode nearestMode, boolean preserveAspectRatio, boolean antialias)ImageResize(@NonNull INDArray in, @NonNull INDArray size, NearestMode nearestMode, boolean preserveAspectRatio, boolean antialias)NonMaxSuppression(INDArray boxes, INDArray scores, int maxOutSize, double iouThreshold, double scoreThreshold)NonMaxSuppressionWithOverlaps(INDArray boxes, INDArray scores, int maxOutSize, double iouThreshold, double scoreThreshold)ResizeArea(@NonNull INDArray x, INDArray z, int height, int width, boolean alignCorners)ResizeBicubic(@NonNull INDArray image, INDArray size, boolean alignCorners, boolean alignPixelCenters)ResizeBilinear(@NonNull INDArray x, INDArray z, int height, int width, boolean alignCorners, boolean halfPixelCenters)ResizeBilinear(INDArray input, int height, int width, boolean alignCorners, boolean halfPixelCenters) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.indexaccum
Constructors in org.nd4j.linalg.api.ops.impl.indexaccum with parameters of type INDArray Constructor Description FirstIndex(INDArray x, boolean keepDims, @NonNull Condition condition, int... dimension)FirstIndex(INDArray x, @NonNull Condition condition, boolean keepDims, int... dimension)FirstIndex(INDArray x, @NonNull Condition condition, double eps, int... dimension)FirstIndex(INDArray x, @NonNull Condition condition, int... dimension)LastIndex(INDArray in, boolean keepDim, Condition condition, int... dimensions)LastIndex(INDArray x, @NonNull Condition condition, boolean keepDim, int... dimensions)LastIndex(INDArray x, @NonNull Condition condition, double eps, int... dimensions)LastIndex(INDArray x, @NonNull Condition condition, int... dimensions) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.indexaccum.custom
Constructors in org.nd4j.linalg.api.ops.impl.indexaccum.custom with parameters of type INDArray Constructor Description ArgAmax(INDArray[] inputs)ArgAmax(INDArray[] inputs, int[] dim)ArgAmax(INDArray[] inputs, INDArray[] outputs)ArgAmax(INDArray[] inputs, INDArray[] outputs, boolean keepDims)ArgAmax(INDArray[] inputs, INDArray[] outputs, boolean keepDims, int... dimensions)ArgAmin(INDArray[] inputs)ArgAmin(INDArray[] inputs, int[] dim)ArgAmin(INDArray[] inputs, INDArray[] outputs)ArgAmin(INDArray[] inputs, INDArray[] outputs, boolean keepDims)ArgAmin(INDArray[] inputs, INDArray[] outputs, boolean keepDims, int... dimensions)ArgMax(String opName, INDArray[] inputs, INDArray[] outputs, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)ArgMax(String opName, INDArray[] inputs, INDArray[] outputs, List<Double> tArguments, int[] iArguments, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)ArgMax(String opName, INDArray[] inputs, INDArray[] outputs, List<Double> tArguments, List<Integer> iArguments, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)ArgMax(String opName, INDArray input, INDArray output, List<Double> tArguments, int[] iArguments, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)ArgMax(INDArray arr)ArgMax(INDArray[] inputs)ArgMax(INDArray[] inputs, boolean keepDims, int[] dimensions)ArgMax(INDArray[] inputs, INDArray[] outputs)ArgMax(INDArray[] inputs, INDArray[] outputs, boolean keepDims)ArgMax(INDArray[] inputs, INDArray[] outputs, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)ArgMax(INDArray[] input, INDArray[] output, boolean keepDims, boolean isComplex, int[] dimensions)ArgMax(INDArray[] inputs, INDArray[] outputs, boolean keepDims, int... dimensions)ArgMax(INDArray in, boolean keepDims, int[] dimensions)ArgMin(String opName, INDArray[] inputs, INDArray[] outputs, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)ArgMin(String opName, INDArray[] inputs, INDArray[] outputs, List<Double> tArguments, int[] iArguments, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)ArgMin(String opName, INDArray[] inputs, INDArray[] outputs, List<Double> tArguments, List<Integer> iArguments, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)ArgMin(String opName, INDArray input, INDArray output, List<Double> tArguments, int[] iArguments, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)ArgMin(INDArray arr)ArgMin(INDArray[] inputs)ArgMin(INDArray[] inputs, boolean keepDims, int[] dimensions)ArgMin(INDArray[] inputs, INDArray[] outputs)ArgMin(INDArray[] inputs, INDArray[] outputs, boolean keepDims)ArgMin(INDArray[] inputs, INDArray[] outputs, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)ArgMin(INDArray[] input, INDArray[] output, boolean keepDims, boolean isComplex, int[] dimensions)ArgMin(INDArray[] inputs, INDArray[] outputs, boolean keepDims, int... dimensions)ArgMin(INDArray in, boolean keepDims, int[] dimensions) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.layers
Constructor parameters in org.nd4j.linalg.api.ops.impl.layers with type arguments of type INDArray Constructor Description ExternalErrorsFunction(SameDiff sd, List<SDVariable> inputs, Map<String,INDArray> gradients) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.layers.convolution
Constructors in org.nd4j.linalg.api.ops.impl.layers.convolution with parameters of type INDArray Constructor Description AvgPooling2D(@NonNull INDArray input, INDArray output, @NonNull Pooling2DConfig config)AvgPooling2D(@NonNull INDArray input, Pooling2DConfig config)AvgPooling3D(@NonNull INDArray input, Pooling3DConfig pooling3DConfig)BatchNorm(SameDiff sameDiff, SDVariable[] inputFunctions, INDArray[] inputArrays, INDArray[] outputArrays, boolean inPlace, boolean applyGamma, boolean applyBeta, double epsilon, int[] axis)BatchNorm(INDArray input, INDArray mean, INDArray variance, INDArray gamma, INDArray beta, double epsilon, int... axis)BatchNormDerivative(SameDiff sameDiff, SDVariable[] inputFunctions, INDArray[] inputArrays, INDArray[] outputArrays, boolean inPlace, boolean applyGamma, boolean applyBeta, double epsilon, int[] axis)Col2Im(@NonNull INDArray in, @NonNull Conv2DConfig conv2DConfig)Col2Im(SameDiff sameDiff, SDVariable[] inputFunctions, INDArray[] inputArrays, INDArray[] outputs, Conv2DConfig conv2DConfig)Conv1D(@NonNull INDArray input, @NonNull INDArray weights, INDArray bias, INDArray output, @NonNull Conv1DConfig config)Conv1D(INDArray[] inputs, INDArray[] outputs, Conv1DConfig config)Conv1D(INDArray input, INDArray weights, INDArray bias, Conv1DConfig config)Conv1DDerivative(@NonNull INDArray input, @NonNull INDArray weights, INDArray bias, @NonNull INDArray gradOut, INDArray output, @NonNull Conv1DConfig config)Conv1DDerivative(INDArray[] inputs, INDArray[] outputs, Conv1DConfig config)Conv2D(@NonNull INDArray input, @NonNull INDArray weights, INDArray bias, INDArray output, @NonNull Conv2DConfig config)Conv2D(INDArray[] inputs, INDArray[] outputs, Conv2DConfig config)Conv2D(INDArray layerInput, INDArray weights, INDArray bias, Conv2DConfig config)Conv3D(@NonNull INDArray input, @NonNull INDArray weights, INDArray bias, INDArray output, @NonNull Conv3DConfig config)Conv3D(INDArray[] inputs, INDArray[] outputs, Conv3DConfig config)Conv3D(INDArray input, INDArray weights, INDArray bias, Conv3DConfig config)Conv3D(INDArray input, INDArray weights, Conv3DConfig config)DeConv2D(@NonNull INDArray input, @NonNull INDArray weights, INDArray bias, INDArray output, @NonNull DeConv2DConfig config)DeConv2D(INDArray[] inputs, INDArray[] outputs, DeConv2DConfig config)DeConv2D(INDArray layerInput, INDArray weights, INDArray bias, DeConv2DConfig config)DeConv2DTF(INDArray[] inputs, INDArray[] outputs, DeConv2DConfig config)DeConv3D(@NonNull INDArray input, @NonNull INDArray weights, INDArray bias, INDArray output, @NonNull DeConv3DConfig config)DeConv3D(INDArray[] inputs, INDArray[] outputs, DeConv3DConfig config)DeConv3D(INDArray input, INDArray weights, INDArray bias, DeConv3DConfig config)DepthToSpace(INDArray in, int blockSize, DataFormat dataFormat)DepthToSpace(INDArray in, INDArray out, int blockSize, DataFormat dataFormat)DepthwiseConv2D(@NonNull INDArray input, @NonNull INDArray weights, INDArray bias, INDArray output, @NonNull Conv2DConfig config)DepthwiseConv2D(INDArray[] inputs, INDArray[] outputs, Conv2DConfig config)DepthwiseConv2D(INDArray layerInput, INDArray depthWeights, INDArray bias, Conv2DConfig config)Im2col(SameDiff sameDiff, SDVariable[] inputFunctions, INDArray[] inputArrays, INDArray[] outputs, Conv2DConfig conv2DConfig)Im2col(INDArray in, Conv2DConfig conv2DConfig)LocalResponseNormalization(@NonNull INDArray input, @NonNull LocalResponseNormalizationConfig LocalResponseNormalizationConfig)LocalResponseNormalization(@NonNull INDArray input, INDArray output, @NonNull LocalResponseNormalizationConfig config)MaxPooling2D(INDArray input, @NonNull Pooling2DConfig config)MaxPooling2D(INDArray input, INDArray output, @NonNull Pooling2DConfig config)MaxPooling3D(INDArray arrayInput, INDArray arrayOutput, Pooling3DConfig config)MaxPooling3D(INDArray input, Pooling3DConfig pooling3DConfig)MaxPoolWithArgmax(@NonNull INDArray input, @NonNull Pooling2DConfig config)MaxPoolWithArgmax(@NonNull INDArray input, INDArray output, INDArray outArgMax, @NonNull Pooling2DConfig config)Pooling2D(@NonNull INDArray[] inputs, INDArray[] outputs, @NonNull Pooling2DConfig config)Pooling2D(@NonNull INDArray input, INDArray output, @NonNull Pooling2DConfig config)Pooling2DDerivative(@NonNull INDArray input, @NonNull INDArray grad, INDArray output, Pooling2DConfig config)Pooling3D(SameDiff sameDiff, SDVariable[] inputs, INDArray[] inputArrays, INDArray[] outputs, boolean inPlace, Pooling3DConfig pooling3DConfig, Pooling3D.Pooling3DType type)Pooling3DDerivative(SameDiff sameDiff, SDVariable[] inputs, INDArray[] inputArrays, INDArray[] outputs, boolean inPlace, Pooling3DConfig pooling3DConfig, Pooling3D.Pooling3DType type)SConv2D(@NonNull INDArray layerInput, @NonNull INDArray depthWeights, INDArray pointWeights, @NonNull Conv2DConfig Conv2DConfig)SConv2D(INDArray[] inputs, INDArray[] outputs, Conv2DConfig config)SConv2D(INDArray layerInput, INDArray depthWeights, INDArray pointWeights, INDArray bias, Conv2DConfig config)SpaceToDepth(INDArray x, int blockSize, DataFormat dataFormat)SpaceToDepth(INDArray in, INDArray out, int blockSize, DataFormat dataFormat)Upsampling2d(INDArray input, int scale)Upsampling2d(INDArray input, int scaleH, int scaleW, boolean nchw)Upsampling3d(INDArray input, boolean ncdhw, int scaleH, int scaleW, int scaleD) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.layers.recurrent
Constructors in org.nd4j.linalg.api.ops.impl.layers.recurrent with parameters of type INDArray Constructor Description GRU(@NonNull INDArray x, @NonNull INDArray hI, @NonNull INDArray Wx, @NonNull INDArray Wh, @NonNull INDArray biases)GRUCell(INDArray x, INDArray hLast, GRUWeights gruWeights)LSTMBlock(INDArray x, INDArray cLast, INDArray yLast, INDArray maxTSLength, LSTMWeights lstmWeights, LSTMConfiguration lstmConfiguration)LSTMBlockCell(INDArray x, INDArray cLast, INDArray yLast, LSTMWeights lstmWeights, LSTMConfiguration lstmConfiguration)LSTMLayer(INDArray x, INDArray cLast, INDArray yLast, INDArray maxTSLength, LSTMLayerWeights lstmWeights, LSTMLayerConfig LSTMLayerConfig)SRU(INDArray x, INDArray initialC, INDArray mask, SRUWeights sruWeights)SRU(INDArray x, INDArray initialC, SRUWeights sruWeights)SRUCell(INDArray x, INDArray cLast, SRUWeights sruWeights) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.layers.recurrent.weights
Methods in org.nd4j.linalg.api.ops.impl.layers.recurrent.weights that return INDArray Modifier and Type Method Description INDArray[]LSTMLayerWeights. argsWithInputs(INDArray... inputs)INDArray[]RNNWeights. argsWithInputs(INDArray... inputs)INDArray[]GRUWeights. arrayArgs()INDArray[]LSTMLayerWeights. arrayArgs()INDArray[]LSTMWeights. arrayArgs()abstract INDArray[]RNNWeights. arrayArgs()INDArray[]SRUWeights. arrayArgs()Methods in org.nd4j.linalg.api.ops.impl.layers.recurrent.weights with parameters of type INDArray Modifier and Type Method Description INDArray[]LSTMLayerWeights. argsWithInputs(INDArray... inputs)INDArray[]RNNWeights. argsWithInputs(INDArray... inputs) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.loss
Methods in org.nd4j.linalg.api.ops.impl.loss that return INDArray Modifier and Type Method Description protected static INDArrayBaseLoss. getWeights(INDArray weights, INDArray predictions)Methods in org.nd4j.linalg.api.ops.impl.loss with parameters of type INDArray Modifier and Type Method Description protected static INDArrayBaseLoss. getWeights(INDArray weights, INDArray predictions)Constructors in org.nd4j.linalg.api.ops.impl.loss with parameters of type INDArray Constructor Description AbsoluteDifferenceLoss(INDArray labels, INDArray predictions, INDArray weights, LossReduce lossReduce)BaseLoss(@NonNull LossReduce lossReduce, @NonNull INDArray predictions, INDArray weights, @NonNull INDArray labels)CosineDistanceLoss(INDArray labels, INDArray predictions, INDArray weights, LossReduce lossReduce, int dimension)CtcLoss(INDArray targetLabels, INDArray logitInputs, INDArray targetLabelLengths, INDArray logitInputLengths)HingeLoss(INDArray labels, INDArray predictions, INDArray weights, LossReduce lossReduce)HuberLoss(INDArray labels, INDArray predictions, INDArray weights, LossReduce lossReduce, double delta)L2Loss(INDArray var)LogLoss(INDArray labels, INDArray predictions, INDArray weights, LossReduce lossReduce, double epsilon)LogPoissonLoss(INDArray labels, INDArray predictions, INDArray weights, LossReduce lossReduce, boolean full)MeanPairwiseSquaredErrorLoss(INDArray labels, INDArray predictions, INDArray weights, LossReduce lossReduce)MeanSquaredErrorLoss(INDArray labels, INDArray predictions, INDArray weights, LossReduce lossReduce)SigmoidCrossEntropyLoss(INDArray labels, INDArray predictions, INDArray weights, LossReduce lossReduce, double labelSmoothing)SoftmaxCrossEntropyLoss(INDArray labels, INDArray predictions, INDArray weights, LossReduce lossReduce, double labelSmoothing)SparseSoftmaxCrossEntropyLossWithLogits(@NonNull INDArray logits, @NonNull INDArray labels)WeightedCrossEntropyLoss(@NonNull LossReduce lossReduce, @NonNull INDArray predictions, INDArray weights, @NonNull INDArray labels)WeightedCrossEntropyLoss(INDArray targets, INDArray inputs, INDArray weights) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.meta
Constructors in org.nd4j.linalg.api.ops.impl.meta with parameters of type INDArray Constructor Description BaseMetaOp(INDArray x, INDArray y)InvertedPredicateMetaOp(INDArray x, INDArray y)PostulateMetaOp(INDArray x, INDArray y)PredicateMetaOp(INDArray x, INDArray y)ReduceMetaOp(INDArray x, INDArray y) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.nlp
Constructors in org.nd4j.linalg.api.ops.impl.nlp with parameters of type INDArray Constructor Description CbowRound(int target, @lombok.NonNull int[] context, @lombok.NonNull int[] lockedWords, int ngStarter, @NonNull INDArray syn0, @NonNull INDArray syn1Neg, @NonNull INDArray expTable, @NonNull INDArray negTable, int nsRounds, double alpha, long nextRandom, @NonNull INDArray inferenceVector, int numLabels)ns roundCbowRound(int target, @lombok.NonNull int[] context, @lombok.NonNull int[] lockedWords, @NonNull INDArray syn0, @NonNull INDArray syn1, @NonNull INDArray expTable, @lombok.NonNull int[] indices, @lombok.NonNull byte[] codes, double alpha, long nextRandom, @NonNull INDArray inferenceVector, int numLabels)hs roundCbowRound(@NonNull INDArray target, @NonNull INDArray context, @NonNull INDArray lockedWords, @NonNull INDArray ngStarter, @NonNull INDArray syn0, @NonNull INDArray syn1, @NonNull INDArray syn1Neg, @NonNull INDArray expTable, @NonNull INDArray negTable, @NonNull INDArray indices, @NonNull INDArray codes, int nsRounds, @NonNull INDArray alpha, @NonNull INDArray nextRandom, @NonNull INDArray inferenceVector, @NonNull INDArray numLabels, boolean trainWords, int numWorkers)full constructorSkipGramRound(int target, int ngStarter, @NonNull INDArray syn0, @NonNull INDArray syn1Neg, @NonNull INDArray expTable, @NonNull INDArray negTable, int nsRounds, double alpha, long randomValue, INDArray inferenceVector)sg ns roundSkipGramRound(int target, @NonNull INDArray syn0, @NonNull INDArray syn1, @NonNull INDArray expTable, int[] indices, byte[] codes, double alpha, long randomValue, INDArray inferenceVector)sg hs roundSkipGramRound(@NonNull INDArray target, @NonNull INDArray ngStarter, @NonNull INDArray syn0, @NonNull INDArray syn1, @NonNull INDArray syn1Neg, @NonNull INDArray expTable, @NonNull INDArray negTable, int nsRounds, @NonNull INDArray indices, @NonNull INDArray codes, @NonNull INDArray alpha, @NonNull INDArray randomValue, INDArray inferenceVector, boolean preciseMode, int numWorkers)full constructor -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.reduce
Constructors in org.nd4j.linalg.api.ops.impl.reduce with parameters of type INDArray Constructor Description HashCode(@NonNull INDArray array)HashCode(@NonNull INDArray array, @NonNull INDArray result)Mmul(INDArray x, INDArray y)Mmul(INDArray x, INDArray y, boolean transposeX, boolean transposeY, boolean transposeZ)Mmul(INDArray x, INDArray y, double alpha, double beta)Mmul(INDArray x, INDArray y, double alpha, double beta, boolean transposeX, boolean transposeY, boolean transposeZ)Mmul(INDArray x, INDArray y, INDArray z, double alpha, double beta, MMulTranspose mt)Mmul(INDArray x, INDArray y, INDArray z, MMulTranspose mt)MmulBp(INDArray x, INDArray y, INDArray eps, INDArray dldx, INDArray dldy, MMulTranspose mt)Moments(@NonNull INDArray input, boolean keepDims, int... dimensions)Moments(@NonNull INDArray input, int... dimensions)Moments(INDArray input, int[] axes, boolean keepDims)Moments(INDArray input, INDArray axes, boolean keepDims)Moments(INDArray in, INDArray outMean, INDArray outStd, int... axes)NormalizeMoments(INDArray counts, INDArray means, INDArray variances, double shift)NormalizeMoments(INDArray counts, INDArray ssSum, INDArray ssSqSum, INDArray outMean, INDArray outVar)SufficientStatistics(@NonNull INDArray x, @NonNull INDArray axes)SufficientStatistics(@NonNull INDArray x, @NonNull INDArray axes, INDArray shift)TensorMmul(INDArray x, INDArray y, int[][] axes)TensorMmul(INDArray x, INDArray y, int[] dimensionsX, int[] dimensionsY, boolean transposeX, boolean transposeY, boolean transposeZ)TensorMmul(INDArray x, INDArray y, INDArray z, int[][] axes)Initialize with the given input, pairwise transform, result, and number of elementsTensorMmulBp(INDArray x, INDArray y, INDArray gradAtOutput, int[][] axes)TensorMmulBp(INDArray x, INDArray y, INDArray gradAtOutput, int[] axesX, int[] axesY)TensorMmulBp(INDArray x, INDArray y, INDArray gradAtOutput, INDArray dldx, INDArray dldy, int[][] axes)TensorMmulBp(INDArray x, INDArray y, INDArray gradAtOutput, INDArray dldx, INDArray dldy, int[] axesX, int[] axesY)ZeroFraction(@NonNull INDArray input) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.reduce.bool
Constructors in org.nd4j.linalg.api.ops.impl.reduce.bool with parameters of type INDArray Constructor Description All(INDArray x)All(INDArray x, boolean keepDims, int... dimensions)All(INDArray x, int... axis)All(INDArray x, INDArray z, boolean keepDims, int[] dimensions)All(INDArray x, INDArray z, int... dimensions)All(INDArray x, INDArray y, INDArray z, boolean keepDims, int[] dimensions)All(INDArray x, INDArray y, INDArray z, int... dimensions)Any(INDArray x)Any(INDArray x, boolean keepDims, int... dimensions)Any(INDArray x, int... dimensions)Any(INDArray x, INDArray z, boolean keepDims, int[] dimensions)Any(INDArray x, INDArray z, int... dimensions)Any(INDArray x, INDArray y, INDArray z, boolean keepDims, int[] dimensions)Any(INDArray x, INDArray y, INDArray z, int... dimensions)IsInf(INDArray x)IsInf(INDArray x, boolean keepDims, int... dimensions)IsInf(INDArray x, int... dimensions)IsInf(INDArray x, INDArray z)IsInf(INDArray x, INDArray z, boolean keepDims, int[] dimensions)IsInf(INDArray x, INDArray z, int... dimensions)IsInf(INDArray x, INDArray y, INDArray z, boolean keepDims, int[] dimensions)IsInf(INDArray x, INDArray y, INDArray z, int... dimensions)IsNaN(INDArray x)IsNaN(INDArray x, boolean keepDims, int... dimensions)IsNaN(INDArray x, int... dimensions)IsNaN(INDArray x, INDArray z)IsNaN(INDArray x, INDArray z, boolean keepDims, int[] dimensions)IsNaN(INDArray x, INDArray z, int... dimensions)IsNaN(INDArray x, INDArray y, INDArray z, boolean keepDims, int[] dimensions)IsNaN(INDArray x, INDArray y, INDArray z, int... dimensions) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.reduce.bp
Constructors in org.nd4j.linalg.api.ops.impl.reduce.bp with parameters of type INDArray Constructor Description BaseReductionBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, int... dimensions)BaseReductionBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, INDArray dimensions)BaseReductionBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output, boolean keepDims, int... dimensions)BaseReductionBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output1, INDArray output2, boolean keepDims, int... dimensions)CumProdBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, boolean exclusive, boolean reverse, int... dimensions)CumProdBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean exclusive, boolean reverse, int... axis)CumProdBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, INDArray dimensions, boolean exclusive, boolean reverse)CumProdBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output, boolean keepDims, boolean exclusive, boolean reverse, int... dimensions)CumProdBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output1, INDArray output2, boolean keepDims, boolean exclusive, boolean reverse, int... dimensions)CumSumBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, boolean exclusive, boolean reverse, int... dimensions)CumSumBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean exclusive, boolean reverse, int... axis)CumSumBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, INDArray dimensions, boolean exclusive, boolean reverse)CumSumBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output, boolean keepDims, boolean exclusive, boolean reverse, int... dimensions)CumSumBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output1, INDArray output2, boolean keepDims, boolean exclusive, boolean reverse, int... dimensions)DotBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, int... dimensions)DotBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, INDArray dimensions)DotBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output, boolean keepDims, int... dimensions)DotBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray outputX, INDArray outputY, boolean keepDims, int... dimensions)MaxBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, int... dimensions)MaxBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, INDArray dimensions)MaxBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output, boolean keepDims, int... dimensions)MaxBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output1, INDArray output2, boolean keepDims, int... dimensions)MeanBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, int... dimensions)MeanBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, INDArray dimensions)MeanBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output, boolean keepDims, int... dimensions)MeanBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output1, INDArray output2, boolean keepDims, int... dimensions)MinBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, int... dimensions)MinBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, INDArray dimensions)MinBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output, boolean keepDims, int... dimensions)MinBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output1, INDArray output2, boolean keepDims, int... dimensions)Norm1Bp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, int... dimensions)Norm1Bp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, INDArray dimensions)Norm1Bp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output, boolean keepDims, int... dimensions)Norm1Bp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output1, INDArray output2, boolean keepDims, int... dimensions)Norm2Bp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, int... dimensions)Norm2Bp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, INDArray dimensions)Norm2Bp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output, boolean keepDims, int... dimensions)Norm2Bp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output1, INDArray output2, boolean keepDims, int... dimensions)NormMaxBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, int... dimensions)NormMaxBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, INDArray dimensions)NormMaxBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output, boolean keepDims, int... dimensions)NormMaxBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output1, INDArray output2, boolean keepDims, int... dimensions)PowBp(INDArray x, INDArray y, INDArray dLdz, INDArray dLdx, INDArray dLdy)ProdBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, int... dimensions)ProdBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, INDArray dimensions)ProdBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output, boolean keepDims, int... dimensions)ProdBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output1, INDArray output2, boolean keepDims, int... dimensions)SquaredNormBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, int... dimensions)SquaredNormBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, INDArray dimensions)SquaredNormBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output, boolean keepDims, int... dimensions)SquaredNormBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output1, INDArray output2, boolean keepDims, int... dimensions)StandardDeviationBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean biasCorrected, boolean keepDims, int... dimensions)StandardDeviationBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, INDArray dimensions, boolean biasCorrected)StandardDeviationBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output, boolean keepDims, boolean biasCorrected, int... dimensions)StandardDeviationBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output1, INDArray output2, boolean keepDims, boolean biasCorrected, int... dimensions)SumBp(INDArray preReduceInput, INDArray dLdOut, INDArray dLdIn, boolean keepDims)SumBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, INDArray dimensions)VarianceBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean biasCorrected, boolean keepDims, int... dimensions)VarianceBp(INDArray origInput, INDArray gradAtOutput, INDArray output, boolean keepDims, INDArray dimensions, boolean biasCorrected)VarianceBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output, boolean keepDims, boolean biasCorrected, int... dimensions)VarianceBp(INDArray origInput1, INDArray origInput2, INDArray gradAtOutput, INDArray output1, INDArray output2, boolean keepDims, boolean biasCorrected, int... dimensions) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.reduce.custom
Constructors in org.nd4j.linalg.api.ops.impl.reduce.custom with parameters of type INDArray Constructor Description BaseDynamicCustomBoolReduction(String opName, INDArray[] inputs, INDArray[] outputs, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)BaseDynamicCustomBoolReduction(String opName, INDArray[] inputs, INDArray[] outputs, List<Double> tArguments, int[] iArguments, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)BaseDynamicCustomBoolReduction(String opName, INDArray[] inputs, INDArray[] outputs, List<Double> tArguments, List<Integer> iArguments, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)BaseDynamicCustomBoolReduction(String opName, INDArray input, INDArray output, List<Double> tArguments, int[] iArguments, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)BaseDynamicCustomBoolReduction(INDArray[] inputs, boolean keepDims, int[] dimensions)BaseDynamicCustomBoolReduction(INDArray[] inputs, INDArray[] outputs)BaseDynamicCustomBoolReduction(INDArray[] inputs, INDArray[] outputs, boolean keepDims)BaseDynamicCustomBoolReduction(INDArray[] inputs, INDArray[] outputs, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)BaseDynamicCustomBoolReduction(INDArray[] input, INDArray[] output, boolean keepDims, boolean isComplex, int[] dimensions)BaseDynamicCustomBoolReduction(INDArray[] inputs, INDArray[] outputs, boolean keepDims, int[] dimensions)BaseDynamicCustomIndexReduction(String opName, INDArray[] inputs, INDArray[] outputs, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)BaseDynamicCustomIndexReduction(String opName, INDArray[] inputs, INDArray[] outputs, List<Double> tArguments, int[] iArguments, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)BaseDynamicCustomIndexReduction(String opName, INDArray[] inputs, INDArray[] outputs, List<Double> tArguments, List<Integer> iArguments, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)BaseDynamicCustomIndexReduction(String opName, INDArray input, INDArray output, List<Double> tArguments, int[] iArguments, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)BaseDynamicCustomIndexReduction(INDArray[] inputs, boolean keepDims, int[] dimensions)BaseDynamicCustomIndexReduction(INDArray[] inputs, INDArray[] outputs)BaseDynamicCustomIndexReduction(INDArray[] inputs, INDArray[] outputs, boolean keepDims)BaseDynamicCustomIndexReduction(INDArray[] inputs, INDArray[] outputs, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)BaseDynamicCustomIndexReduction(INDArray[] input, INDArray[] output, boolean keepDims, boolean isComplex, int[] dimensions)BaseDynamicCustomIndexReduction(INDArray[] inputs, INDArray[] outputs, boolean keepDims, int... dimensions)BaseDynamicCustomLongReduction(String opName, INDArray[] inputs, INDArray[] outputs, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)BaseDynamicCustomLongReduction(String opName, INDArray[] inputs, INDArray[] outputs, List<Double> tArguments, int[] iArguments, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)BaseDynamicCustomLongReduction(String opName, INDArray[] inputs, INDArray[] outputs, List<Double> tArguments, List<Integer> iArguments, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)BaseDynamicCustomLongReduction(String opName, INDArray input, INDArray output, List<Double> tArguments, int[] iArguments, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)BaseDynamicCustomLongReduction(INDArray[] inputs, boolean keepDims, int[] dimensions)BaseDynamicCustomLongReduction(INDArray[] inputs, INDArray[] outputs)BaseDynamicCustomLongReduction(INDArray[] inputs, INDArray[] outputs, boolean keepDims)BaseDynamicCustomLongReduction(INDArray[] inputs, INDArray[] outputs, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)BaseDynamicCustomLongReduction(INDArray[] input, INDArray[] output, boolean keepDims, boolean isComplex, int[] dimensions)BaseDynamicCustomLongReduction(INDArray[] inputs, INDArray[] outputs, boolean keepDims, int[] dimensions)BaseDynamicCustomReduction(String opName, INDArray[] inputs, INDArray[] outputs, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)BaseDynamicCustomReduction(String opName, INDArray[] inputs, INDArray[] outputs, List<Double> tArguments, int[] iArguments, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)BaseDynamicCustomReduction(String opName, INDArray[] inputs, INDArray[] outputs, List<Double> tArguments, List<Integer> iArguments, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)BaseDynamicCustomReduction(String opName, INDArray input, INDArray output, List<Double> tArguments, int[] iArguments, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)BaseDynamicCustomReduction(INDArray[] inputs, boolean keepDims, int[] dimensions)BaseDynamicCustomReduction(INDArray[] inputs, INDArray[] outputs)BaseDynamicCustomReduction(INDArray[] inputs, INDArray[] outputs, boolean keepDims)BaseDynamicCustomReduction(INDArray[] inputs, INDArray[] outputs, boolean keepDims, boolean isComplex, boolean isEmptyReduce, int[] dimensions)BaseDynamicCustomReduction(INDArray[] input, INDArray[] output, boolean keepDims, boolean isComplex, int[] dimensions)BaseDynamicCustomReduction(INDArray[] inputs, INDArray[] outputs, boolean keepDims, int[] dimensions)BatchMmul(INDArray[] matricesA, INDArray[] matricesB, boolean transposeA, boolean transposeB)LogSumExp(INDArray x, boolean keepDim, int... dimensions)LogSumExp(INDArray x, int... dimensions)LogSumExp(INDArray x, INDArray z, boolean keepDim, int... dimensions) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.reduce.floating
Methods in org.nd4j.linalg.api.ops.impl.reduce.floating that return INDArray Modifier and Type Method Description INDArrayNorm1. noOp()INDArrayNorm2. noOp()INDArrayNormMax. noOp()Constructors in org.nd4j.linalg.api.ops.impl.reduce.floating with parameters of type INDArray Constructor Description AMean(INDArray in, boolean keepDims, int[] dimensions)AMean(INDArray x, int... dimensions)AMean(INDArray in, int[] dimensions, boolean keepDims)AMean(INDArray in, INDArray dimensions, boolean keepDims)AMean(INDArray input, INDArray output, boolean keepDims, int... dimensions)AMean(INDArray x, INDArray z, int... dimensions)AMean(INDArray x, INDArray y, INDArray z, boolean keepDims, int... dimensions)AMean(INDArray x, INDArray y, INDArray z, int... dimensions)Entropy(INDArray in, boolean keepDims, int[] dimensions)Entropy(INDArray x, int... dimensions)Entropy(INDArray in, int[] dimensions, boolean keepDims)Entropy(INDArray input, INDArray output, boolean keepDims, int... dimensions)Entropy(INDArray x, INDArray z, int... dimensions)Entropy(INDArray x, INDArray y, INDArray z, boolean keepDims, int... dimensions)Entropy(INDArray x, INDArray y, INDArray z, int... dimensions)LogEntropy(INDArray in, boolean keepDims, int[] dimensions)LogEntropy(INDArray x, int... dimensions)LogEntropy(INDArray in, int[] dimensions, boolean keepDims)LogEntropy(INDArray input, INDArray output, boolean keepDims, int... dimensions)LogEntropy(INDArray x, INDArray z, int... dimensions)LogEntropy(INDArray x, INDArray y, INDArray z, boolean keepDims, int... dimensions)LogEntropy(INDArray x, INDArray y, INDArray z, int... dimensions)Mean(INDArray x, boolean keepDims, int... dimensions)Mean(INDArray x, int... dimensions)Mean(INDArray in, int[] dimensions, boolean keepDims)Mean(INDArray x, INDArray z, boolean keepDims, int... dimensions)Mean(INDArray x, INDArray z, int... dimensions)Mean(INDArray x, INDArray y, INDArray z, boolean keepDims, int... dimensions)Mean(INDArray x, INDArray y, INDArray z, int... dimensions)Norm1(INDArray x, boolean keepDims, int... dimensions)Norm1(INDArray x, int... dimensions)Norm1(INDArray in, int[] dimensions, boolean keepDims)Norm1(INDArray in, INDArray dimensions, boolean keepDims)Norm1(INDArray input, INDArray output, boolean keepDims, int... dimensions)Norm1(INDArray x, INDArray z, int... dimensions)Norm1(INDArray x, INDArray y, INDArray z, boolean keepDims, int... dimensions)Norm1(INDArray x, INDArray y, INDArray z, int... dimensions)Norm2(INDArray x, boolean keepDims, int... dimensions)Norm2(INDArray x, int... dimensions)Norm2(INDArray in, int[] dimensions, boolean keepDims)Norm2(INDArray in, INDArray indArray, boolean keepDims)Norm2(INDArray input, INDArray output, boolean keepDims, int... dimensions)Norm2(INDArray x, INDArray z, int... dimensions)Norm2(INDArray x, INDArray y, INDArray z, boolean keepDims, int... dimensions)Norm2(INDArray x, INDArray y, INDArray z, int... dimensions)NormMax(INDArray x, boolean keepDims, int... dimensions)NormMax(INDArray x, int... dimensions)NormMax(INDArray in, int[] dimensions, boolean keepDims)NormMax(INDArray in, INDArray indArray, boolean keepDims)NormMax(INDArray input, INDArray output, boolean keepDims, int... dimensions)NormMax(INDArray x, INDArray z, int... dimensions)NormMax(INDArray x, INDArray y, INDArray z, boolean keepDims, int... dimensions)NormMax(INDArray x, INDArray y, INDArray z, int... dimensions)ShannonEntropy(INDArray in, boolean keepDims, int[] dimensions)ShannonEntropy(INDArray x, int... dimensions)ShannonEntropy(INDArray in, int[] dimensions, boolean keepDims)ShannonEntropy(INDArray in, INDArray dimensions, boolean keepDims)ShannonEntropy(INDArray input, INDArray output, boolean keepDims, int... dimensions)ShannonEntropy(INDArray x, INDArray z, int... dimensions)ShannonEntropy(INDArray x, INDArray y, INDArray z, boolean keepDims, int... dimensions)ShannonEntropy(INDArray x, INDArray y, INDArray z, int... dimensions)SquaredNorm(INDArray input, boolean keepDims, int... dimensions)SquaredNorm(INDArray x, int... dimensions)SquaredNorm(INDArray in, int[] dimensions, boolean keepDims)SquaredNorm(INDArray input, INDArray output, boolean keepDims, int... dimensions)SquaredNorm(INDArray x, INDArray z, int... dimensions)SquaredNorm(INDArray x, INDArray y, INDArray z, boolean keepDims, int... dimensions)SquaredNorm(INDArray x, INDArray y, INDArray z, int... dimensions) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.reduce.longer
Constructors in org.nd4j.linalg.api.ops.impl.reduce.longer with parameters of type INDArray Constructor Description CountNonZero(INDArray in, boolean keepDims, int[] dimensions)CountNonZero(INDArray x, int... dimensions)CountNonZero(INDArray in, int[] dimensions, boolean keepDims)CountNonZero(INDArray x, INDArray z, int... dimensions)CountNonZero(INDArray x, INDArray y, INDArray z, boolean keepDims, int[] dimensions)CountNonZero(INDArray x, INDArray y, INDArray z, int... dimensions)CountZero(INDArray x, boolean keepDims, int... dimensions)CountZero(INDArray x, int... dimensions)CountZero(INDArray in, int[] dimensions, boolean keepDims)CountZero(INDArray x, INDArray z, int... dimensions)CountZero(INDArray x, INDArray y, INDArray z, boolean keepDims, int[] dimensions)CountZero(INDArray x, INDArray y, INDArray z, int... dimensions)MatchCondition(INDArray x, boolean keepDims, double compare, double eps, int... dimensions)MatchCondition(INDArray x, boolean keepDims, double compare, double eps, int mode, int... dimensions)MatchCondition(INDArray x, boolean keepDims, double compare, int... dimensions)MatchCondition(INDArray x, double compare, double eps, int... dimensions)MatchCondition(INDArray x, double compare, double eps, int mode, int... dimensions)MatchCondition(INDArray x, double compare, int... dimensions)MatchCondition(INDArray x, double eps, Condition condition, int... dimensions)MatchCondition(INDArray x, INDArray z, double compare, double eps, int... dimensions)MatchCondition(INDArray x, INDArray z, double compare, double eps, int mode, int... dimensions)MatchCondition(INDArray x, INDArray z, double compare, int... dimensions)MatchCondition(INDArray x, INDArray y, INDArray z, boolean keepDims, int[] dimensions, double compare)MatchCondition(INDArray x, INDArray y, INDArray z, boolean keepDims, int[] dimensions, double compare, double eps)MatchCondition(INDArray x, INDArray y, INDArray z, boolean keepDims, int[] dimensions, double compare, double eps, int mode)MatchCondition(INDArray x, INDArray y, INDArray z, double compare, double eps, int... dimensions)MatchCondition(INDArray x, INDArray y, INDArray z, double compare, double eps, int mode, int... dimensions)MatchCondition(INDArray x, INDArray y, INDArray z, double compare, int... dimensions)MatchCondition(INDArray x, Condition condition, boolean keepDims, int... dimensions)MatchCondition(INDArray x, Condition condition, int... dimensions) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.reduce.same
Constructors in org.nd4j.linalg.api.ops.impl.reduce.same with parameters of type INDArray Constructor Description AMax(INDArray in, boolean keepDims, int[] dimensions)AMax(INDArray x, int... dimensions)AMax(INDArray in, int[] dimensions, boolean keepDims)AMax(INDArray in, INDArray dimensions, boolean keepDims)AMax(INDArray x, INDArray z, boolean keepDims, int[] dimensions)AMax(INDArray x, INDArray z, int... dimensions)AMax(INDArray x, INDArray y, INDArray z, boolean keepDims, int[] dimensions)AMax(INDArray x, INDArray y, INDArray z, int... dimensions)AMin(INDArray in, boolean keepDims, int[] dimensions)AMin(INDArray x, int... dimensions)AMin(INDArray in, int[] dimensions, boolean keepDims)AMin(INDArray in, INDArray dimensions, boolean keepDims)AMin(INDArray x, INDArray z, boolean keepDims, int[] dimensions)AMin(INDArray x, INDArray z, int... dimensions)AMin(INDArray x, INDArray y, INDArray z, boolean keepDims, int[] dimensions)AMin(INDArray x, INDArray y, INDArray z, int... dimensions)ASum(INDArray in, boolean keepDims, int[] dimensions)ASum(INDArray x, int... dimensions)ASum(INDArray in, int[] dimensions, boolean keepDims)ASum(INDArray x, INDArray z, boolean keepDims, int[] dimensions)ASum(INDArray x, INDArray z, int... dimensions)ASum(INDArray x, INDArray y, INDArray z, boolean keepDims, int[] dimensions)ASum(INDArray x, INDArray y, INDArray z, int... dimensions)Max(INDArray x, boolean keepDims, int... axis)Max(INDArray x, int... axis)Initialize with the given input, pairwise transform, result, and number of elementsMax(INDArray in, int[] dimensions, boolean keepDims)Max(INDArray x, INDArray z, boolean keepDims, int... dimensions)Max(INDArray x, INDArray z, int... axis)Max(INDArray x, INDArray y, INDArray z, boolean keepDims, int[] dimensions)Max(INDArray x, INDArray y, INDArray z, int... dimensions)Min(INDArray x, boolean keepDims, int... dimensions)Min(INDArray x, int... dimensions)Min(INDArray in, int[] dimensions, boolean keepDims)Min(INDArray x, INDArray z, boolean keepDims, int... dimensions)Min(INDArray x, INDArray z, int... dimensions)Min(INDArray x, INDArray y, INDArray z, boolean keepDims, int[] dimensions)Min(INDArray x, INDArray y, INDArray z, int... dimensions)Prod(INDArray x, boolean keepDims, int... dimensions)Prod(INDArray x, int... dimensions)Prod(INDArray in, int[] dimensions, boolean keepDims)Prod(INDArray x, INDArray z, boolean keepDims, int... dimensions)Prod(INDArray x, INDArray z, int... dimensions)Prod(INDArray x, INDArray y, INDArray z, boolean keepDims, int[] dimensions)Prod(INDArray x, INDArray y, INDArray z, int... dimensions)Sum(INDArray x, boolean keepDims, int... dimensions)Sum(INDArray x, int... dimensions)Sum(INDArray in, int[] dimensions, boolean keepDims)Sum(INDArray x, INDArray z, boolean keepDims, int... dimensions)Sum(INDArray x, INDArray z, int... dimensions)Sum(INDArray x, INDArray y, INDArray z, boolean keepDims, int[] dimensions)Sum(INDArray x, INDArray y, INDArray z, int... dimensions) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.reduce3
Constructors in org.nd4j.linalg.api.ops.impl.reduce3 with parameters of type INDArray Constructor Description BaseReduce3Op(INDArray x, INDArray y, boolean allDistances, int... dimensions)BaseReduce3Op(INDArray x, INDArray y, int... dimensions)BaseReduce3Op(INDArray x, INDArray y, INDArray z)BaseReduce3Op(INDArray x, INDArray y, INDArray z, boolean keepDims, boolean allDistances, int... dimensions)BaseReduce3Op(INDArray x, INDArray y, INDArray z, boolean keepDims, int... dimensions)BaseReduce3Op(INDArray x, INDArray y, INDArray z, int... dimensions)CosineDistance(INDArray x, INDArray y, boolean keepDims, boolean isComplex, int[] dimensions)CosineDistance(INDArray x, INDArray y, boolean allDistances, int... dimension)CosineDistance(INDArray x, INDArray y, int... dimension)CosineDistance(INDArray x, INDArray y, INDArray z)CosineDistance(INDArray x, INDArray y, INDArray z, boolean keepDims, boolean allDistances, int... dimensions)CosineDistance(INDArray x, INDArray y, INDArray z, boolean allDistances, int... dimension)CosineDistance(INDArray x, INDArray y, INDArray z, int... dimension)CosineSimilarity(INDArray x, INDArray y, boolean keepDims, boolean isComplex, int[] dimensions)CosineSimilarity(INDArray x, INDArray y, boolean allDistances, int... dimension)CosineSimilarity(INDArray x, INDArray y, int... dimensions)CosineSimilarity(INDArray x, INDArray y, INDArray z)CosineSimilarity(INDArray x, INDArray y, INDArray z, boolean keepDims, boolean allDistances, int... dimensions)CosineSimilarity(INDArray x, INDArray y, INDArray z, boolean allDistances, int... dimension)CosineSimilarity(INDArray x, INDArray y, INDArray z, int... dimensions)Dot(INDArray x, INDArray y, boolean allDistances, int... dimensions)Dot(INDArray x, INDArray y, int... dimensions)Dot(INDArray x, INDArray y, INDArray z)Dot(INDArray x, INDArray y, INDArray z, boolean newFormat, boolean keepDims, int... dimensions)Dot(INDArray x, INDArray y, INDArray z, boolean keepDims, int... dimensions)Dot(INDArray x, INDArray y, INDArray z, int... dimensions)Full array dot product reduction, optionally along specified dimensions.
See wikipedia for details.EqualsWithEps(INDArray x, INDArray y, boolean allDistances, double eps, int... dimensions)EqualsWithEps(INDArray x, INDArray y, boolean allDistances, int... dimensions)EqualsWithEps(INDArray x, INDArray y, double eps, int... dimensions)EqualsWithEps(INDArray x, INDArray y, int... dimensions)EqualsWithEps(INDArray x, INDArray y, INDArray z)EqualsWithEps(INDArray x, INDArray y, INDArray z, boolean keepDims, boolean allDistances, double eps, int... dimensions)EqualsWithEps(INDArray x, INDArray y, INDArray z, boolean keepDims, boolean allDistances, int... dimensions)EqualsWithEps(INDArray x, INDArray y, INDArray z, boolean keepDims, double eps, int... dimensions)EqualsWithEps(INDArray x, INDArray y, INDArray z, boolean keepDims, int... dimensions)EqualsWithEps(INDArray x, INDArray y, INDArray z, double eps)EqualsWithEps(INDArray x, INDArray y, INDArray z, double eps, int... dimensions)EqualsWithEps(INDArray x, INDArray y, INDArray z, int... dimensions)EuclideanDistance(INDArray x, INDArray y, boolean keepDims, boolean isComplex, int[] dimensions)EuclideanDistance(INDArray x, INDArray y, boolean allDistances, int... dimensions)EuclideanDistance(INDArray x, INDArray y, int... dimensions)EuclideanDistance(INDArray x, INDArray y, INDArray z)EuclideanDistance(INDArray x, INDArray y, INDArray z, boolean keepDims, boolean allDistances, int... dimensions)EuclideanDistance(INDArray x, INDArray y, INDArray z, boolean allDistances, int... dimensions)EuclideanDistance(INDArray x, INDArray y, INDArray z, int... dimensions)HammingDistance(INDArray x, INDArray y, boolean keepDims, boolean isComplex, int[] dimensions)HammingDistance(INDArray x, INDArray y, boolean allDistances, int... dimensions)HammingDistance(INDArray x, INDArray y, int... dimensions)HammingDistance(INDArray x, INDArray y, INDArray z)HammingDistance(INDArray x, INDArray y, INDArray z, boolean keepDims, boolean allDistances, int... dimensions)HammingDistance(INDArray x, INDArray y, INDArray z, boolean allDistances, int... dimensions)HammingDistance(INDArray x, INDArray y, INDArray z, int... dimensions)JaccardDistance(INDArray x, INDArray y, boolean allDistances)JaccardDistance(INDArray x, INDArray y, boolean keepDims, boolean isComplex, int[] dimensions)JaccardDistance(INDArray x, INDArray y, boolean allDistances, int... dimensions)JaccardDistance(INDArray x, INDArray y, int... dimensions)JaccardDistance(INDArray x, INDArray y, INDArray z)JaccardDistance(INDArray x, INDArray y, INDArray z, boolean keepDims, boolean allDistances, int... dimensions)JaccardDistance(INDArray x, INDArray y, INDArray z, boolean allDistances, int... dimensions)JaccardDistance(INDArray x, INDArray y, INDArray z, int... dimensions)ManhattanDistance(INDArray x, INDArray y, boolean keepDims, boolean isComplex, int[] dimensions)ManhattanDistance(INDArray x, INDArray y, boolean allDistances, int... dimensions)ManhattanDistance(INDArray x, INDArray y, int... dimensions)ManhattanDistance(INDArray x, INDArray y, INDArray z)ManhattanDistance(INDArray x, INDArray y, INDArray z, boolean keepDims, boolean allDistances, int... dimensions)ManhattanDistance(INDArray x, INDArray y, INDArray z, boolean allDistances, int... dimensions)ManhattanDistance(INDArray x, INDArray y, INDArray z, int... dimensions) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.scalar
-
Uses of INDArray in org.nd4j.linalg.api.ops.impl.scalar.comparison
-
Uses of INDArray in org.nd4j.linalg.api.ops.impl.scatter
Constructors in org.nd4j.linalg.api.ops.impl.scatter with parameters of type INDArray Constructor Description ScatterAdd(@NonNull INDArray ref, @NonNull INDArray indices, @NonNull INDArray update)ScatterDiv(@NonNull INDArray ref, @NonNull INDArray indices, @NonNull INDArray update)ScatterMax(@NonNull INDArray ref, @NonNull INDArray indices, @NonNull INDArray update)ScatterMin(@NonNull INDArray ref, @NonNull INDArray indices, @NonNull INDArray update)ScatterMul(@NonNull INDArray ref, @NonNull INDArray indices, @NonNull INDArray update)ScatterSub(INDArray ref, INDArray indices, INDArray update)ScatterUpdate(INDArray ref, INDArray indices, INDArray update) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.shape
Methods in org.nd4j.linalg.api.ops.impl.shape that return INDArray Modifier and Type Method Description static INDArrayCreateView. createFrom(INDArray input, INDArray... indices)Methods in org.nd4j.linalg.api.ops.impl.shape with parameters of type INDArray Modifier and Type Method Description protected static booleanMergeMaxIndex. areEqualShapes(INDArray... inputs)static INDArrayCreateView. createFrom(INDArray input, INDArray... indices)static INDArrayIndexCreateView. fromIndexArr(INDArray index)static INDArrayIndex[]CreateView. indices(INDArray... indexArrs)Constructors in org.nd4j.linalg.api.ops.impl.shape with parameters of type INDArray Constructor Description Concat(int concatDimension, INDArray... arrays)Concat(INDArray[] arrays, int concatDimension)ConfusionMatrix(@NonNull INDArray labels, @NonNull INDArray predicted, int numClasses)ConfusionMatrix(@NonNull INDArray labels, @NonNull INDArray predicted, @NonNull DataType dataType)ConfusionMatrix(@NonNull INDArray labels, @NonNull INDArray predicted, Integer numClasses, @NonNull DataType dataType)ConfusionMatrix(@NonNull INDArray labels, @NonNull INDArray predicted, INDArray weights)ConfusionMatrix(@NonNull INDArray labels, @NonNull INDArray predicted, INDArray weights, Integer numClasses)ConfusionMatrix(@NonNull INDArray labels, @NonNull INDArray predicted, INDArray weights, Integer numClasses, @NonNull DataType dataType)Create(@NonNull INDArray shape, char order, boolean initialize, DataType dataType)Create(INDArray shape, boolean initialize, DataType dataType)Create(INDArray shape, DataType dataType)Create(INDArray shape, DataType dataType, String order, boolean initialize)CreateView(INDArray[] inputs)CreateView(INDArray input, INDArray[] indices)Cross(INDArray a, INDArray b)Cross(INDArray a, INDArray b, INDArray out)Diag(@NonNull INDArray input)Diag(@NonNull INDArray input, @NonNull INDArray output)DiagPart(INDArray in)DiagPart(INDArray in, INDArray out)ExpandDims(INDArray[] inputs, INDArray[] outputs)ExpandDims(INDArray x, int axis)Eye(@NonNull INDArray rows)Eye(@NonNull INDArray rows, @NonNull INDArray columns)Flatten2D(INDArray in, long axis)Gather(INDArray df, int[] indexes, int axis)Gather(INDArray df, INDArray indexes, int axis)GatherNd(INDArray[] inputs, INDArray[] outputs)GatherNd(INDArray df, INDArray indices)Linspace(@NonNull INDArray start, @NonNull INDArray stop, @NonNull INDArray number, @NonNull DataType dataType)Linspace(DataType dataType, INDArray start, INDArray stop, INDArray number)MergeAvg(INDArray... inputs)MergeMax(INDArray... inputs)MergeMaxIndex(@NonNull INDArray... inputs)MergeMaxIndex(@NonNull INDArray[] x, @NonNull DataType dataType)MeshGrid(@NonNull INDArray[] inputs, boolean cartesian)OneHot(INDArray indices, int depth)OneHot(INDArray indices, int depth, int axis, double on, double off)OneHot(INDArray indices, int depth, int axis, double on, double off, DataType dataType)OneHot(INDArray indices, INDArray output, int depth)OneHot(INDArray indices, INDArray output, int depth, int axis, double on, double off)OnesAs(@NonNull INDArray input)OnesAs(@NonNull INDArray input, DataType dataType)OnesLike(@NonNull INDArray input)OnesLike(@NonNull INDArray input, DataType dataType)ParallelStack(INDArray[] inputs)Permute(INDArray input, int... permuteDims)Permute(INDArray input, INDArray result, int... permuteDims)Rank(INDArray indArray)Repeat(INDArray[] inputs, INDArray[] outputs, int axis)Repeat(INDArray[] inputs, INDArray[] outputs, List<Double> tArguments, List<Integer> iArguments, int axis)Repeat(INDArray input, INDArray repeats, int axis)Reshape(@NonNull INDArray in, @NonNull INDArray shape, INDArray out)Reshape(INDArray in, long... shape)Reshape(INDArray in, INDArray shape)SequenceMask(@NonNull INDArray input, int maxLen, DataType dataType)SequenceMask(@NonNull INDArray input, @NonNull DataType dataType)SequenceMask(@NonNull INDArray input, INDArray maxLength, @NonNull DataType dataType)SetShape(INDArray in, INDArray shape)SetShape(INDArray in, INDArray shape, INDArray out)Shape(INDArray in)Shape(INDArray in, INDArray out)Size(INDArray in)SizeAt(INDArray input, int dimension)SizeAt(INDArray input, INDArray output, int dimension)Slice(@NonNull INDArray input, @NonNull INDArray begin, @NonNull INDArray end)Slice(INDArray input, int[] begin, int... size)Split(@NonNull INDArray in, INDArray out)Split(INDArray input, int numSplit, int splitDim)Split(INDArray input, INDArray numSplit, int splitDim)SplitV(INDArray input, INDArray sizes, int numSplit, int splitDim)Squeeze(INDArray x, int axis)Stack(INDArray[] input, int axis)Stack(INDArray[] inputs, INDArray output, int axis)StridedSlice(INDArray in, int[] begin, int[] end, int[] strides, int beginMask, int endMask, int ellipsisMask, int newAxisMask, int shrinkAxisMask)StridedSlice(INDArray in, long[] begin, long[] end, long[] strides, int beginMask, int endMask, int ellipsisMask, int newAxisMask, int shrinkAxisMask)StridedSlice(INDArray in, INDArray begin, INDArray end, INDArray strides)StridedSlice(INDArray in, INDArray begin, INDArray end, INDArray strides, int beginMask, int endMask, int ellipsisMask, int newAxisMask, int shrinkAxisMask)Tile(INDArray[] inputs, INDArray[] outputs, int[] axis)Tile(INDArray[] inputs, INDArray[] outputs, int[] axis, boolean is_static_reps)Tile(INDArray inputs, int... axis)Tile(INDArray x, INDArray repeat)Transpose(INDArray input)Transpose(INDArray input, INDArray result)Unstack(@NonNull INDArray value, int axis, int num)Unstack(INDArray in, INDArray[] out, int axis)ZerosLike(INDArray in)ZerosLike(INDArray in, INDArray out)ZerosLike(INDArray in, INDArray out, DataType dataType) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.shape.tensorops
Constructors in org.nd4j.linalg.api.ops.impl.shape.tensorops with parameters of type INDArray Constructor Description EmbeddingLookup(@NonNull INDArray in, @NonNull INDArray indices, PartitionMode partitionMode, INDArray output)EmbeddingLookup(@NonNull INDArray in, INDArray output, PartitionMode partitionMode, @lombok.NonNull int... indices)TensorArrayConcat(INDArray inputVar)TensorArrayGather(INDArray in, INDArray indices)TensorArrayScatter(INDArray input, INDArray indices, INDArray scatter) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.summarystats
Methods in org.nd4j.linalg.api.ops.impl.summarystats that return INDArray Modifier and Type Method Description INDArrayVariance. noOp()Constructors in org.nd4j.linalg.api.ops.impl.summarystats with parameters of type INDArray Constructor Description StandardDeviation(INDArray x)StandardDeviation(INDArray x, boolean biasCorrected, boolean keepDims, int... dimension)StandardDeviation(INDArray x, boolean keepDims, double mean, double bias, boolean biasCorrected, int... dimensions)StandardDeviation(INDArray x, boolean keepDims, double mean, double bias, int... dimensions)StandardDeviation(INDArray x, boolean keepDims, double mean, int... dimensions)StandardDeviation(INDArray x, boolean biasCorrected, int... dimension)StandardDeviation(INDArray x, double mean, double bias, boolean biasCorrected, int... dimensions)StandardDeviation(INDArray x, double mean, double bias, int... dimensions)StandardDeviation(INDArray x, double mean, int... dimensions)StandardDeviation(INDArray x, int... dimension)StandardDeviation(INDArray x, INDArray z, boolean newFormat, boolean keepDims, int[] dimensions)StandardDeviation(INDArray x, INDArray z, boolean biasCorrected, int... dimension)StandardDeviation(INDArray x, INDArray y, double mean, double bias, boolean biasCorrected, int... dimensions)StandardDeviation(INDArray x, INDArray y, double mean, double bias, int... dimensions)StandardDeviation(INDArray x, INDArray y, double mean, int... dimensions)StandardDeviation(INDArray x, INDArray y, INDArray z, boolean keepDims, int[] dimensions, double mean)StandardDeviation(INDArray x, INDArray y, INDArray z, boolean keepDims, int[] dimensions, double mean, double bias)StandardDeviation(INDArray x, INDArray y, INDArray z, boolean keepDims, int[] dimensions, double mean, double bias, boolean biasCorrected)StandardDeviation(INDArray x, INDArray y, INDArray z, double mean, double bias, boolean biasCorrected, int... dimensions)StandardDeviation(INDArray x, INDArray y, INDArray z, double mean, double bias, int... dimensions)StandardDeviation(INDArray x, INDArray y, INDArray z, double mean, int... dimensions)Variance(INDArray x, boolean biasCorrected, boolean keepDims, int... dimensions)Variance(INDArray x, boolean keepDims, double mean, double bias, boolean biasCorrected, int... dimensions)Variance(INDArray x, boolean keepDims, double mean, double bias, int... dimensions)Variance(INDArray x, boolean keepDims, double mean, int... dimensions)Variance(INDArray x, boolean biasCorrected, int... dimensions)Variance(INDArray x, double mean, double bias, boolean biasCorrected, int... dimensions)Variance(INDArray x, double mean, double bias, int... dimensions)Variance(INDArray x, double mean, int... dimensions)Variance(INDArray x, int... dimension)Variance(INDArray x, INDArray z, boolean biasCorrected, boolean keepDims, int... dimensions)Variance(INDArray x, INDArray z, boolean biasCorrected, int... dimensions)Variance(INDArray x, INDArray y, double mean, double bias, boolean biasCorrected, int... dimensions)Variance(INDArray x, INDArray y, double mean, double bias, int... dimensions)Variance(INDArray x, INDArray y, double mean, int... dimensions)Variance(INDArray x, INDArray y, INDArray z, boolean keepDims, int[] dimensions, double mean)Variance(INDArray x, INDArray y, INDArray z, boolean keepDims, int[] dimensions, double mean, double bias)Variance(INDArray x, INDArray y, INDArray z, boolean keepDims, int[] dimensions, double mean, double bias, boolean biasCorrected)Variance(INDArray x, INDArray y, INDArray z, double mean, double bias, boolean biasCorrected, int... dimensions)Variance(INDArray x, INDArray y, INDArray z, double mean, double bias, int... dimensions)Variance(INDArray x, INDArray y, INDArray z, double mean, int... dimensions) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.transforms
Constructors in org.nd4j.linalg.api.ops.impl.transforms with parameters of type INDArray Constructor Description Assert(INDArray x)BaseDynamicTransformOp(INDArray[] inputs, INDArray[] outputs)Cholesky(INDArray input)Histogram(INDArray input, long numBins)Histogram(INDArray input, INDArray output)MaxOut(INDArray x)MaxOut(INDArray x, INDArray z)Pad(@NonNull INDArray in, @NonNull INDArray padding, double padValue)Pad(@NonNull INDArray in, @NonNull INDArray padding, @NonNull PadMode mode, double padValue)Pad(@NonNull INDArray in, @NonNull INDArray padding, INDArray out, @NonNull PadMode mode, double padValue)Pad(@NonNull INDArray in, @NonNull INDArray padding, INDArray out, @NonNull Pad.Mode mode, double padValue)Pad(INDArray input, INDArray padding, Mode mode, double padValue)ReluLayer(@NonNull INDArray input, @NonNull INDArray weights, @NonNull INDArray bias) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.transforms.any
Constructors in org.nd4j.linalg.api.ops.impl.transforms.any with parameters of type INDArray Constructor Description Assign(INDArray x)Assign(INDArray x, INDArray z)IsMax(INDArray x)IsMax(INDArray x, int... dimensions)IsMax(INDArray x, INDArray z)IsMax(INDArray x, INDArray z, int... dimensions) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.transforms.bool
Constructors in org.nd4j.linalg.api.ops.impl.transforms.bool with parameters of type INDArray Constructor Description BooleanNot(@NonNull INDArray x)BooleanNot(@NonNull INDArray x, INDArray z)IsFinite(INDArray x)IsFinite(INDArray x, INDArray z)IsInf(INDArray x)IsInf(INDArray x, INDArray z)IsNaN(INDArray x)IsNaN(INDArray x, INDArray z)MatchConditionTransform(@NonNull INDArray x, @NonNull INDArray y, @NonNull INDArray z, @NonNull Condition condition)MatchConditionTransform(@NonNull INDArray x, @NonNull INDArray z, @NonNull Condition condition)MatchConditionTransform(INDArray x, double eps, @NonNull Condition condition)MatchConditionTransform(INDArray x, @NonNull Condition condition)MatchConditionTransform(INDArray x, INDArray z, double eps, @NonNull Condition condition) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.transforms.clip
Constructors in org.nd4j.linalg.api.ops.impl.transforms.clip with parameters of type INDArray Constructor Description ClipByAvgNorm(INDArray in, double clipValue, int... dimensions)ClipByAvgNorm(INDArray in, INDArray out, double clipValue, int... dimensions)ClipByNorm(INDArray in, double clipValue, int... dimensions)ClipByNorm(INDArray in, INDArray out, double clipValue, int... dimensions)ClipByNorm(INDArray x, INDArray clipValue, INDArray dimensions)ClipByValue(@NonNull INDArray input, double clipValueMin, double clipValueMax)ClipByValue(INDArray x, INDArray clipValueMin, INDArray clipValueMax) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.transforms.comparison
Constructors in org.nd4j.linalg.api.ops.impl.transforms.comparison with parameters of type INDArray Constructor Description CompareAndReplace(INDArray x, INDArray y, INDArray z, Condition condition)With this constructor, op will check each X element against given Condition, and if condition met, element Z will be set to Y value, and X otherwise Pseudocode: z[i] = condition(x[i]) ? y[i] : x[i];CompareAndReplace(INDArray x, INDArray y, Condition condition)With this constructor, op will check each X element against given Condition, and if condition met, element Z will be set to Y value, and X otherwise PLEASE NOTE: X will be modified inplace.CompareAndSet(INDArray x, double compare, double set, double eps)CompareAndSet(INDArray x, double compare, double set, double eps, Condition condition)CompareAndSet(INDArray x, double set, Condition condition)With this constructor, op will check each X element against given Condition, and if condition met, element will be replaced with Set value Pseudocode: z[i] = condition(x[i]) ? set : x[i]; PLEASE NOTE: X will be modified inplace.CompareAndSet(INDArray x, INDArray z, double compare, double set, double eps)This constructor is shortcut to epsEquals.CompareAndSet(INDArray x, INDArray z, double set, Condition condition)With this constructor, op will check each X element against given Condition, and if condition met, element will be replaced with Set value Pseudocode: z[i] = condition(x[i]) ? set : x[i];CompareAndSet(INDArray x, INDArray y, INDArray z, Condition condition)With this constructor, op will check each Y element against given Condition, and if condition met, element Z will be set to Y value, and X otherwise Pseudocode: z[i] = condition(y[i]) ? y[i] : x[i];CompareAndSet(INDArray x, INDArray y, Condition condition)With this constructor, op will check each Y element against given Condition, and if condition met, element Z will be set to Y value, and X otherwise PLEASE NOTE: X will be modified inplace.Eps(INDArray indArray)Eps(INDArray x, INDArray y, INDArray z) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.transforms.custom
Methods in org.nd4j.linalg.api.ops.impl.transforms.custom that return INDArray Modifier and Type Method Description INDArrayInvertPermutation. generateFake(long... shape)INDArrayInvertPermutation. generateFake(DataType dataType, long... shape)Constructors in org.nd4j.linalg.api.ops.impl.transforms.custom with parameters of type INDArray Constructor Description Assign(INDArray[] inputs, INDArray[] outputs)Assign(INDArray x, INDArray y)ATan2(INDArray x, INDArray y)Note that the order of x and y matchMath.atan2(double, double), and are reversed when compared to OldATan2.ATan2(INDArray x, INDArray y, INDArray z)Note that the order of x and y matchMath.atan2(double, double), and are reversed when compared to OldATan2.BatchToSpace(INDArray x, int[] blocks, int[] croppingTop, int... croppingBottom)BitsHammingDistance(@NonNull INDArray x, @NonNull INDArray y)BitwiseAnd(INDArray x, INDArray y)BitwiseAnd(INDArray x, INDArray y, INDArray output)BitwiseOr(INDArray x, INDArray y)BitwiseOr(INDArray x, INDArray y, INDArray output)BitwiseXor(INDArray x, INDArray y)BitwiseXor(INDArray x, INDArray y, INDArray output)Choose(String opName, INDArray[] inputs, INDArray[] outputs, List<Double> tArguments, List<Integer> iArguments)Choose(String opName, INDArray[] inputs, Condition condition)Choose(INDArray[] inputs, List<Integer> iArgs, List<Double> tArgs, Condition condition)Note that iArgs (integer arguments) and tArgs(double/float arguments) may end up being used under the following conditions: scalar operations (if a scalar is specified the you do not need to specify an ndarray) otherwise, if an ndarray is needed as a second input then put it in the inputs Usually, you only need 1 input (the equivalent of the array you're trying to do indexing on)Choose(INDArray[] inputs, Condition condition)CReLU(@NonNull INDArray input)CReluBp(@NonNull INDArray input, @NonNull INDArray epsilonNext, INDArray output)CumProd(INDArray in, boolean exclusive, boolean reverse, int... axis)CumProd(INDArray in, INDArray result, boolean exclusive, boolean reverse, int... axis)CumSum(INDArray in, boolean exclusive, boolean reverse, int... axis)CumSum(INDArray in, INDArray result, boolean exclusive, boolean reverse, int... axis)CyclicRShiftBits(INDArray input, INDArray shift)CyclicRShiftBits(INDArray input, INDArray shift, INDArray output)CyclicShiftBits(INDArray input, INDArray shift)CyclicShiftBits(INDArray input, INDArray shift, INDArray output)Dilation2D(INDArray[] inputArrays, INDArray[] outputs)Dilation2D(INDArray df, INDArray weights, int[] strides, int[] rates, boolean isSameMode)DotProductAttention(@NonNull INDArray queries, @NonNull INDArray keys, @NonNull INDArray values, INDArray mask, boolean scaled)DotProductAttention(@NonNull INDArray queries, @NonNull INDArray keys, @NonNull INDArray values, INDArray mask, boolean scaled, boolean withWeights)DynamicPartition(@NonNull INDArray input, @NonNull INDArray partitions, int numPartitions)DynamicPartition(INDArray x, INDArray[] partitions, int numPartitions)DynamicStitch(@NonNull INDArray[] indices, @NonNull INDArray[] inputs)EqualTo(INDArray[] inputs, INDArray[] outputs)EqualTo(INDArray x, INDArray y)EqualTo(INDArray x, INDArray y, INDArray z)FakeQuantWithMinMaxArgs(INDArray x, INDArray min, INDArray max, int num_bits, boolean narrow)FakeQuantWithMinMaxVars(INDArray x, INDArray min, INDArray max, int num_bits, boolean narrow)Fill(INDArray shape, DataType dtype, double value)Fill(INDArray shape, INDArray result, double value)Fill(INDArray shape, INDArray value, INDArray result)GreaterThan(INDArray[] inputs, INDArray[] outputs)GreaterThan(INDArray x, INDArray y)GreaterThan(INDArray x, INDArray y, INDArray z)GreaterThanOrEqual(INDArray[] inputs, INDArray[] outputs)GreaterThanOrEqual(INDArray x, INDArray y)GreaterThanOrEqual(INDArray x, INDArray y, INDArray z)InvertPermutation(INDArray input)IsNonDecreasing(@NonNull INDArray input)IsNonDecreasing(@NonNull INDArray input, INDArray output)IsNumericTensor(INDArray inputs)IsNumericTensor(INDArray[] inputs, INDArray[] outputs)IsStrictlyIncreasing(@NonNull INDArray input)IsStrictlyIncreasing(@NonNull INDArray input, INDArray output)LayerNorm(@NonNull INDArray input, @NonNull INDArray gain, boolean channelsFirst, int... dimensions)LayerNorm(INDArray input, INDArray gain, INDArray result, boolean channelsFirst, int... dimensions)LayerNorm(INDArray input, INDArray gain, INDArray bias, INDArray result, boolean channelsFirst, int... dimensions)LayerNormBp(@NonNull INDArray input, @NonNull INDArray gain, INDArray bias, @NonNull INDArray grad, @NonNull INDArray dLdx, @NonNull INDArray dLdg, INDArray dLdb, boolean channelsFirst, int... dimensions)LayerNormBp(INDArray input, INDArray gain, INDArray grad, INDArray dLdx, INDArray dLdg, boolean channelsFirst, int... dimensions)LessThan(INDArray[] inputs, INDArray[] outputs)LessThan(INDArray x, INDArray y)LessThan(INDArray x, INDArray y, INDArray z)LessThanOrEqual(INDArray[] inputs, INDArray[] outputs)LessThanOrEqual(INDArray x, INDArray y)LessThanOrEqual(INDArray x, INDArray y, INDArray z)ListDiff(@NonNull INDArray x, @NonNull INDArray y)LogSoftMax(INDArray x)LogSoftMax(INDArray x, int dimension)LogSoftMax(INDArray x, INDArray z)MatrixDeterminant(@NonNull INDArray input)MatrixInverse(@NonNull INDArray input)MatrixSetDiag(@NonNull INDArray in, @NonNull INDArray diag)Max(INDArray[] inputs, INDArray[] outputs)Max(INDArray first, INDArray second)Max(INDArray first, INDArray second, INDArray out)Min(INDArray[] inputs, INDArray[] outputs)Min(INDArray first, INDArray second)Min(INDArray first, INDArray second, INDArray out)MultiHeadDotProductAttention(@NonNull INDArray queries, @NonNull INDArray keys, @NonNull INDArray values, @NonNull INDArray Wq, @NonNull INDArray Wk, @NonNull INDArray Wv, @NonNull INDArray Wo, INDArray mask, boolean scaled)MultiHeadDotProductAttention(@NonNull INDArray queries, @NonNull INDArray keys, @NonNull INDArray values, @NonNull INDArray Wq, @NonNull INDArray Wk, @NonNull INDArray Wv, @NonNull INDArray Wo, INDArray mask, boolean scaled, boolean withWeights)NotEqualTo(INDArray[] inputs, INDArray[] outputs)NotEqualTo(INDArray x, INDArray y)NotEqualTo(INDArray x, INDArray y, INDArray z)Pow(@NonNull INDArray x, @NonNull INDArray y)Qr(INDArray input)Qr(INDArray input, boolean fullMatrices)Reverse(INDArray x)Inplace reverse.Reverse(INDArray x, int... axis)This constructor allows to specify axis for Reverse operationReverse(INDArray x, INDArray z)Reverses whole array for compatibility with OldReverse.Reverse(INDArray x, INDArray z, int... axis)This constructor allows to specify axis for Reverse operationReverseSequence(INDArray x, INDArray seq_lengths)ReverseSequence(INDArray x, INDArray seq_lengths, int seqDim, int batchDim)RShiftBits(INDArray input, INDArray shift)RShiftBits(INDArray input, INDArray shift, INDArray output)ShiftBits(INDArray x, INDArray y)ShiftBits(INDArray x, INDArray y, INDArray output)SoftMax(@NonNull INDArray input, int dimension)SoftMax(INDArray input)SoftMax(INDArray input, INDArray result)SoftMax(INDArray input, INDArray result, int dimension)SpaceToBatch(INDArray x, int[] blocks, int[] paddingTop, int... paddingBottom)Standardize(INDArray input, int... dimensions)Standardize(INDArray input, INDArray result, int... dimensions)StandardizeBp(INDArray input, INDArray eps, INDArray result, int... dimensions)Svd(INDArray input, boolean fullUV, boolean computeUV, int switchNum)Svd(INDArray input, boolean full_matrices, INDArray s, INDArray u, INDArray v)ThresholdRelu(@NonNull INDArray input, INDArray output, double cutoff)TopK(INDArray input, double k, boolean sorted)Trace(@NonNull INDArray in)XwPlusB(INDArray[] inputs, INDArray output)XwPlusB(INDArray input, INDArray weights, INDArray bias) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.transforms.custom.segment
Constructors in org.nd4j.linalg.api.ops.impl.transforms.custom.segment with parameters of type INDArray Constructor Description SegmentMax(INDArray data, INDArray segmentIds)SegmentMean(INDArray data, INDArray segmentIds)SegmentMin(INDArray data, INDArray segmentIds)SegmentProd(INDArray data, INDArray segmentIds)SegmentSum(INDArray data, INDArray segmentIds) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.transforms.dtype
Constructors in org.nd4j.linalg.api.ops.impl.transforms.dtype with parameters of type INDArray Constructor Description Cast(@NonNull INDArray arg, @NonNull DataType dataType) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.transforms.floating
Constructors in org.nd4j.linalg.api.ops.impl.transforms.floating with parameters of type INDArray Constructor Description RSqrt(INDArray x)RSqrt(INDArray x, INDArray z)Sqrt(INDArray x)Sqrt(INDArray x, INDArray z)SqrtM(INDArray input)SqrtM(INDArray[] inputs, INDArray[] outputs)SqrtM(INDArray[] inputs, INDArray[] outputs, List<Double> tArguments, int[] iArguments)SqrtM(INDArray[] inputs, INDArray[] outputs, List<Double> tArguments, List<Integer> iArguments) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.transforms.gradient
Constructors in org.nd4j.linalg.api.ops.impl.transforms.gradient with parameters of type INDArray Constructor Description CubeBp(@NonNull INDArray input, @NonNull INDArray gradient, INDArray output)CubeDerivative(INDArray x)Deprecated.CubeDerivative(INDArray x, INDArray z)Deprecated.EluBp(@NonNull INDArray input, @NonNull INDArray gradient, INDArray output)EluBp(@NonNull INDArray input, @NonNull INDArray gradient, INDArray output, double alpha)HardSigmoidBp(@NonNull INDArray input, @NonNull INDArray gradient, INDArray output)HardSigmoidDerivative(INDArray x)Deprecated.HardSigmoidDerivative(INDArray x, INDArray z)Deprecated.HardTanhBp(@NonNull INDArray input, @NonNull INDArray gradient, INDArray output)HardTanhDerivative(INDArray x)Deprecated.HardTanhDerivative(INDArray x, INDArray z)Deprecated.LeakyReLUBp(@NonNull INDArray input, @NonNull INDArray gradient, INDArray output, double alpha)LeakyReLUDerivative(INDArray x)LeakyReLUDerivative(INDArray x, double alpha)LeakyReLUDerivative(INDArray x, INDArray z)LeakyReLUDerivative(INDArray x, INDArray z, double alpha)LogSoftMaxDerivative(INDArray in, INDArray gradO, INDArray out)PReluBp(@NonNull INDArray input, @NonNull INDArray alpha, @NonNull INDArray gradient, INDArray dLdI, INDArray dLdA, int... sharedAxes)RationalTanhBp(@NonNull INDArray input, @NonNull INDArray gradient, INDArray output)RationalTanhDerivative(INDArray x)Deprecated.RationalTanhDerivative(INDArray x, INDArray z)Deprecated.RectifiedTanhBp(@NonNull INDArray input, @NonNull INDArray gradient, INDArray output)RectifiedTanhDerivative(INDArray x)Deprecated.RectifiedTanhDerivative(INDArray x, INDArray z)Deprecated.Relu6Derivative(@NonNull INDArray input, @NonNull INDArray gradient, INDArray output)Relu6Derivative(@NonNull INDArray input, @NonNull INDArray gradient, INDArray output, double cutoff)SeluBp(@NonNull INDArray input, @NonNull INDArray gradient, INDArray output)SELUDerivative(INDArray x)Deprecated.SELUDerivative(INDArray x, INDArray z)Deprecated.SigmoidDerivative(@NonNull INDArray x, @NonNull INDArray y)SigmoidDerivative(INDArray x, INDArray y, INDArray z)SoftmaxBp(@NonNull INDArray input, @NonNull INDArray grad, Integer dimension)SoftmaxBp(@NonNull INDArray input, @NonNull INDArray grad, INDArray output, Integer dimension)SoftPlusBp(@NonNull INDArray input, @NonNull INDArray gradient, INDArray output)SoftSignBp(@NonNull INDArray input, @NonNull INDArray gradient, INDArray output)SoftSignDerivative(INDArray x)Deprecated.SoftSignDerivative(INDArray x, INDArray z)Deprecated.TanhDerivative(INDArray x, INDArray y)TanhDerivative(INDArray x, INDArray y, INDArray z)ThresholdReluBp(@NonNull INDArray input, @NonNull INDArray gradient, INDArray output, double cutoff) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.transforms.pairwise
Constructors in org.nd4j.linalg.api.ops.impl.transforms.pairwise with parameters of type INDArray Constructor Description BinaryMinimalRelativeError(INDArray x, INDArray y, double thresholdRelative, double thresholdAbsolute)BinaryMinimalRelativeError(INDArray x, INDArray y, INDArray z, double thresholdRelative, double thresholdAbsolute)BinaryRelativeError(INDArray x, INDArray y, double threshold)BinaryRelativeError(INDArray x, INDArray y, INDArray z, double threshold)RelativeError(INDArray x, INDArray y)RelativeError(INDArray x, INDArray y, INDArray z)Set(INDArray x)Set(INDArray x, INDArray z)Set(INDArray x, INDArray y, INDArray z) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.transforms.pairwise.arithmetic
-
Uses of INDArray in org.nd4j.linalg.api.ops.impl.transforms.pairwise.bool
Constructors in org.nd4j.linalg.api.ops.impl.transforms.pairwise.bool with parameters of type INDArray Constructor Description And(@NonNull INDArray x, @NonNull INDArray y)And(@NonNull INDArray x, @NonNull INDArray y, Number comparable)And(@NonNull INDArray x, @NonNull INDArray y, INDArray z)And(@NonNull INDArray x, @NonNull INDArray y, INDArray z, Number comparable)Not(@NonNull INDArray x, INDArray y, INDArray z, Number comparable)Or(@NonNull INDArray x, @NonNull INDArray y)Or(@NonNull INDArray x, @NonNull INDArray y, INDArray z)Or(@NonNull INDArray x, @NonNull INDArray y, INDArray z, Number comparable)Xor(@NonNull INDArray x, @NonNull INDArray y)Xor(@NonNull INDArray x, @NonNull INDArray y, INDArray z)Xor(@NonNull INDArray x, @NonNull INDArray y, INDArray z, Number comparable) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.transforms.same
Constructors in org.nd4j.linalg.api.ops.impl.transforms.same with parameters of type INDArray Constructor Description Abs(INDArray x)Abs(INDArray x, INDArray z)AMax(INDArray x, INDArray y, INDArray z)AMin(INDArray x, INDArray y, INDArray z)Ceil(INDArray x)Ceil(INDArray x, INDArray z)Cube(INDArray x)Cube(INDArray x, INDArray z)Floor(INDArray x)Floor(INDArray x, INDArray z)Identity(INDArray x)Identity(INDArray x, INDArray z)Max(INDArray x, INDArray y, INDArray z)Min(INDArray x, INDArray y, INDArray z)Negative(INDArray x)Negative(INDArray x, INDArray z)OneMinus(INDArray x)OneMinus(INDArray x, INDArray z)Reciprocal(INDArray x)Reciprocal(INDArray x, INDArray z)Round(INDArray x)Round(INDArray x, INDArray z)Sign(INDArray x)Sign(INDArray x, INDArray z)Square(INDArray x)Square(INDArray x, INDArray z)TimesOneMinus(INDArray x)TimesOneMinus(INDArray x, INDArray z) -
Uses of INDArray in org.nd4j.linalg.api.ops.impl.transforms.segment
-
Uses of INDArray in org.nd4j.linalg.api.ops.impl.transforms.strict
-
Uses of INDArray in org.nd4j.linalg.api.ops.impl.updaters
Constructors in org.nd4j.linalg.api.ops.impl.updaters with parameters of type INDArray Constructor Description AdaBeliefUpdater(@NonNull INDArray gradients, @NonNull INDArray stateU, @NonNull INDArray stateM, double lr, double beta1, double beta2, double epsilon, int iteration)AdaBeliefUpdater(@NonNull INDArray gradients, @NonNull INDArray stateU, @NonNull INDArray stateM, @NonNull INDArray updates, @NonNull INDArray updatedStateU, @NonNull INDArray updatedStateM, double lr, double beta1, double beta2, double epsilon, int iteration)AdaDeltaUpdater(@NonNull INDArray gradients, @NonNull INDArray stateMsg, @NonNull INDArray stateMsdx, double rho, double epsilon)AdaDeltaUpdater(@NonNull INDArray gradients, @NonNull INDArray stateMsg, @NonNull INDArray stateMsdx, @NonNull INDArray updates, @NonNull INDArray updatedStateMsg, @NonNull INDArray updatedStateMsdx, double rho, double epsilon)AdaGradUpdater(@NonNull INDArray gradients, @NonNull INDArray state, double lr, double epsilon)AdaGradUpdater(@NonNull INDArray gradients, @NonNull INDArray state, @NonNull INDArray updates, @NonNull INDArray updatedState, double lr, double epsilon)AdaMaxUpdater(@NonNull INDArray gradients, @NonNull INDArray stateU, @NonNull INDArray stateM, double lr, double beta1, double beta2, double epsilon, int iteration)AdaMaxUpdater(@NonNull INDArray gradients, @NonNull INDArray stateU, @NonNull INDArray stateM, @NonNull INDArray updates, @NonNull INDArray updatedStateU, @NonNull INDArray updatedStateM, double lr, double beta1, double beta2, double epsilon, int iteration)AdamUpdater(@NonNull INDArray gradients, @NonNull INDArray stateU, @NonNull INDArray stateM, double lr, double beta1, double beta2, double epsilon, int iteration)AdamUpdater(@NonNull INDArray gradients, @NonNull INDArray stateU, @NonNull INDArray stateM, @NonNull INDArray updates, @NonNull INDArray updatedStateU, @NonNull INDArray updatedStateM, double lr, double beta1, double beta2, double epsilon, int iteration)AmsGradUpdater(@NonNull INDArray gradients, @NonNull INDArray stateV, @NonNull INDArray stateM, @NonNull INDArray stateH, double lr, double beta1, double beta2, double epsilon, int iteration)AmsGradUpdater(@NonNull INDArray gradients, @NonNull INDArray stateV, @NonNull INDArray stateM, @NonNull INDArray stateH, @NonNull INDArray updates, @NonNull INDArray updatedStateV, @NonNull INDArray updatedStateM, @NonNull INDArray updatedStateH, double lr, double beta1, double beta2, double epsilon, int iteration)NadamUpdater(@NonNull INDArray gradients, @NonNull INDArray stateV, @NonNull INDArray stateM, double lr, double beta1, double beta2, double epsilon, int iteration)NadamUpdater(@NonNull INDArray gradients, @NonNull INDArray stateV, @NonNull INDArray stateM, @NonNull INDArray updates, @NonNull INDArray updatedStateV, @NonNull INDArray updatedStateM, double lr, double beta1, double beta2, double epsilon, int iteration)NesterovsUpdater(@NonNull INDArray gradients, @NonNull INDArray state, double lr, double momentum)NesterovsUpdater(@NonNull INDArray gradients, @NonNull INDArray state, @NonNull INDArray updates, @NonNull INDArray updatedState, double lr, double momentum)RmsPropUpdater(@NonNull INDArray gradients, @NonNull INDArray state, double lr, double decay, double epsilon)RmsPropUpdater(@NonNull INDArray gradients, @NonNull INDArray state, @NonNull INDArray updates, @NonNull INDArray updatedState, double lr, double decay, double epsilon)SgdUpdater(@NonNull INDArray input, double lr)SgdUpdater(@NonNull INDArray input, @NonNull INDArray output, double lr) -
Uses of INDArray in org.nd4j.linalg.api.ops.random
Constructors in org.nd4j.linalg.api.ops.random with parameters of type INDArray Constructor Description BaseRandomOp(INDArray x, INDArray y, INDArray z) -
Uses of INDArray in org.nd4j.linalg.api.ops.random.compat
Constructors in org.nd4j.linalg.api.ops.random.compat with parameters of type INDArray Constructor Description RandomStandardNormal(INDArray shape)RandomStandardNormal(INDArray shape, INDArray output) -
Uses of INDArray in org.nd4j.linalg.api.ops.random.custom
Constructors in org.nd4j.linalg.api.ops.random.custom with parameters of type INDArray Constructor Description DistributionUniform(INDArray shape, INDArray out, double min, double max)DistributionUniform(INDArray shape, INDArray out, double min, double max, DataType dataType)RandomBernoulli(INDArray shape, INDArray out, double p)RandomExponential(INDArray shape, INDArray out, double lambda)RandomGamma(@NonNull INDArray shape, @NonNull INDArray alpha, INDArray beta)RandomGamma(@NonNull INDArray shape, @NonNull INDArray alpha, INDArray beta, int... seeds)RandomPoisson(@NonNull INDArray shape, @NonNull INDArray rate)RandomPoisson(@NonNull INDArray shape, @NonNull INDArray rate, int... seeds)RandomShuffle(@NonNull INDArray value)RandomShuffle(@NonNull INDArray value, int... seeds) -
Uses of INDArray in org.nd4j.linalg.api.ops.random.impl
Methods in org.nd4j.linalg.api.ops.random.impl that return INDArray Modifier and Type Method Description INDArrayLinspace. x()INDArrayLinspace. y()Methods in org.nd4j.linalg.api.ops.random.impl with parameters of type INDArray Modifier and Type Method Description voidLinspace. setX(INDArray x)voidLinspace. setY(INDArray y)voidBinomialDistribution. setZ(INDArray z)voidLogNormalDistribution. setZ(INDArray z)voidTruncatedNormalDistribution. setZ(INDArray z)Constructors in org.nd4j.linalg.api.ops.random.impl with parameters of type INDArray Constructor Description AlphaDropOut(@NonNull INDArray x, double p, double alpha, double alphaPrime, double beta)AlphaDropOut(@NonNull INDArray x, @NonNull INDArray z, double p, double alpha, double alphaPrime, double beta)BernoulliDistribution(@NonNull INDArray z, double prob)This op fills Z with bernoulli trial results, so 0, or 1, depending by common probabilityBernoulliDistribution(@NonNull INDArray z, @NonNull INDArray prob)This op fills Z with bernoulli trial results, so 0, or 1, each element will have it's own success probability defined in prob arrayBinomialDistribution(@NonNull INDArray z, int trials, double probability)This op fills Z with binomial distribution over given trials with single given probability for all trialsBinomialDistribution(@NonNull INDArray z, int trials, @NonNull INDArray probabilities)This op fills Z with binomial distribution over given trials with probability for each trial given as probabilities INDArrayBinomialDistribution(@NonNull INDArray z, @NonNull INDArray probabilities)This op fills Z with binomial distribution over given trials with probability for each trial given as probabilities INDArrayBinomialDistributionEx(@NonNull INDArray z, long trials, double probability)This op fills Z with binomial distribution over given trials with single given probability for all trialsBinomialDistributionEx(@NonNull INDArray z, long trials, @NonNull INDArray probabilities)This op fills Z with binomial distribution over given trials with probability for each trial given as probabilities INDArrayBinomialDistributionEx(@NonNull INDArray z, @NonNull INDArray probabilities)This op fills Z with binomial distribution over given trials with probability for each trial given as probabilities INDArrayChoice(@NonNull INDArray source, @NonNull INDArray probabilities, @NonNull INDArray z)DropOut(@NonNull INDArray x, double p)DropOut(@NonNull INDArray x, @NonNull INDArray z, double p)DropOutInverted(@NonNull INDArray x, double p)DropOutInverted(@NonNull INDArray x, @NonNull INDArray z, double p)GaussianDistribution(@NonNull INDArray z)This op fills Z with random values within -1.0..0..1.0GaussianDistribution(@NonNull INDArray z, double stddev)This op fills Z with random values within stddev..0..stddevGaussianDistribution(@NonNull INDArray z, double mean, double stddev)This op fills Z with random values within stddev..mean..stddev boundariesGaussianDistribution(@NonNull INDArray z, @NonNull INDArray means, double stddev)Linspace(@NonNull INDArray z, double from, double to)Linspace(@NonNull INDArray z, double from, double to, double step)LogNormalDistribution(@NonNull INDArray z)This op fills Z with random values within -1.0..0..1.0LogNormalDistribution(@NonNull INDArray z, double stddev)This op fills Z with random values within stddev..0..stddevLogNormalDistribution(@NonNull INDArray z, double mean, double stddev)This op fills Z with random values within stddev..mean..stddev boundariesLogNormalDistribution(@NonNull INDArray z, @NonNull INDArray means, double stddev)ProbablisticMerge(@NonNull INDArray x, @NonNull INDArray y, double probability)ProbablisticMerge(@NonNull INDArray x, @NonNull INDArray y, @NonNull INDArray z, double probability)Range(INDArray from, INDArray to, INDArray step, DataType dataType)TruncatedNormalDistribution(@NonNull INDArray z)This op fills Z with random values within -1.0..0..1.0TruncatedNormalDistribution(@NonNull INDArray z, double stddev)This op fills Z with random values within stddev..0..stddevTruncatedNormalDistribution(@NonNull INDArray z, double mean, double stddev)This op fills Z with random values within stddev..mean..stddev boundariesTruncatedNormalDistribution(@NonNull INDArray z, @NonNull INDArray means, double stddev)UniformDistribution(@NonNull INDArray z)This op fills Z with random values within 0...1UniformDistribution(@NonNull INDArray z, double to)This op fills Z with random values within 0...toUniformDistribution(@NonNull INDArray z, double from, double to)This op fills Z with random values within from...to boundaries -
Uses of INDArray in org.nd4j.linalg.api.ops.util
Constructors in org.nd4j.linalg.api.ops.util with parameters of type INDArray Constructor Description PrintAffinity(INDArray array)PrintVariable(INDArray array)PrintVariable(INDArray array, boolean printSpecial)PrintVariable(INDArray array, String message)PrintVariable(INDArray array, String message, boolean printSpecial)PrintVariable(INDArray array, INDArray message)PrintVariable(INDArray array, INDArray message, boolean printSpecial) -
Uses of INDArray in org.nd4j.linalg.api.rng
Methods in org.nd4j.linalg.api.rng that return INDArray Modifier and Type Method Description INDArrayDefaultRandom. nextDouble(char order, int[] shape)INDArrayDefaultRandom. nextDouble(char order, long[] shape)INDArrayDefaultRandom. nextDouble(int[] shape)INDArrayDefaultRandom. nextDouble(long[] shape)INDArrayRandom. nextDouble(char order, int[] shape)Generate a uniform number ndarray of the specified shape and orderINDArrayRandom. nextDouble(char order, long[] shape)INDArrayRandom. nextDouble(int[] shape)Generate a uniform number ndarray of the specified shapeINDArrayRandom. nextDouble(long[] shape)INDArrayDefaultRandom. nextFloat(char order, int[] shape)INDArrayDefaultRandom. nextFloat(char order, long[] shape)INDArrayDefaultRandom. nextFloat(int[] shape)INDArrayDefaultRandom. nextFloat(long[] shape)INDArrayRandom. nextFloat(char order, int[] shape)Generate a uniform number ndarray of the specified shapeINDArrayRandom. nextFloat(char order, long[] shape)INDArrayRandom. nextFloat(int[] shape)Generate a uniform number ndarray of the specified shapeINDArrayRandom. nextFloat(long[] shape)INDArrayDefaultRandom. nextGaussian(char order, int[] shape)INDArrayDefaultRandom. nextGaussian(char order, long[] shape)INDArrayDefaultRandom. nextGaussian(int[] shape)INDArrayDefaultRandom. nextGaussian(long[] shape)INDArrayRandom. nextGaussian(char order, int[] shape)Generate a gaussian number ndarray of the specified shape and orderINDArrayRandom. nextGaussian(char order, long[] shape)INDArrayRandom. nextGaussian(int[] shape)Generate a gaussian number ndarray of the specified shapeINDArrayRandom. nextGaussian(long[] shape)INDArrayDefaultRandom. nextInt(int[] shape)INDArrayDefaultRandom. nextInt(int n, int[] shape)INDArrayDefaultRandom. nextInt(int n, long[] shape)INDArrayDefaultRandom. nextInt(long[] shape)INDArrayRandom. nextInt(int[] shape)Generate a random set of integers of the specified shape.INDArrayRandom. nextInt(int n, int[] shape)Generate a random set of integers of the specified shape.INDArrayRandom. nextInt(int n, long[] shape)INDArrayRandom. nextInt(long[] shape) -
Uses of INDArray in org.nd4j.linalg.api.rng.distribution
Methods in org.nd4j.linalg.api.rng.distribution that return INDArray Modifier and Type Method Description INDArrayBaseDistribution. sample(int[] shape)INDArrayBaseDistribution. sample(long[] shape)INDArrayBaseDistribution. sample(INDArray target)INDArrayDistribution. sample(int[] shape)Sample the given shapeINDArrayDistribution. sample(long[] shape)INDArrayDistribution. sample(INDArray target)Fill the target array by sampling from the distributionMethods in org.nd4j.linalg.api.rng.distribution with parameters of type INDArray Modifier and Type Method Description INDArrayBaseDistribution. sample(INDArray target)INDArrayDistribution. sample(INDArray target)Fill the target array by sampling from the distribution -
Uses of INDArray in org.nd4j.linalg.api.rng.distribution.factory
Methods in org.nd4j.linalg.api.rng.distribution.factory with parameters of type INDArray Modifier and Type Method Description DistributionDefaultDistributionFactory. createBinomial(int n, INDArray p)DistributionDistributionFactory. createBinomial(int n, INDArray p)Create a distributionDistributionDefaultDistributionFactory. createNormal(INDArray mean, double std)DistributionDistributionFactory. createNormal(INDArray mean, double std)Create a normal distribution with the given mean and std -
Uses of INDArray in org.nd4j.linalg.api.rng.distribution.impl
Methods in org.nd4j.linalg.api.rng.distribution.impl that return INDArray Modifier and Type Method Description INDArrayBinomialDistribution. sample(int[] shape)INDArrayBinomialDistribution. sample(INDArray ret)INDArrayConstantDistribution. sample(int[] shape)INDArrayConstantDistribution. sample(INDArray target)INDArrayLogNormalDistribution. sample(int[] shape)INDArrayLogNormalDistribution. sample(INDArray ret)INDArrayNormalDistribution. sample(int[] shape)INDArrayNormalDistribution. sample(INDArray ret)INDArrayOrthogonalDistribution. sample(int[] shape)INDArrayOrthogonalDistribution. sample(long[] shape)INDArrayOrthogonalDistribution. sample(INDArray target)INDArrayTruncatedNormalDistribution. sample(int[] shape)INDArrayTruncatedNormalDistribution. sample(INDArray ret)INDArrayUniformDistribution. sample(int[] shape)INDArrayUniformDistribution. sample(INDArray ret)Methods in org.nd4j.linalg.api.rng.distribution.impl with parameters of type INDArray Modifier and Type Method Description INDArrayBinomialDistribution. sample(INDArray ret)INDArrayConstantDistribution. sample(INDArray target)INDArrayLogNormalDistribution. sample(INDArray ret)INDArrayNormalDistribution. sample(INDArray ret)INDArrayOrthogonalDistribution. sample(INDArray target)INDArrayTruncatedNormalDistribution. sample(INDArray ret)INDArrayUniformDistribution. sample(INDArray ret)Constructors in org.nd4j.linalg.api.rng.distribution.impl with parameters of type INDArray Constructor Description BinomialDistribution(int n, INDArray p)LogNormalDistribution(double standardDeviation, INDArray means)LogNormalDistribution(INDArray mean, double std)LogNormalDistribution(Random rng, double standardDeviation, INDArray means)NormalDistribution(double standardDeviation, INDArray means)NormalDistribution(INDArray mean, double std)NormalDistribution(Random rng, double standardDeviation, INDArray means)TruncatedNormalDistribution(double standardDeviation, INDArray means)TruncatedNormalDistribution(INDArray mean, double std)TruncatedNormalDistribution(Random rng, double standardDeviation, INDArray means) -
Uses of INDArray in org.nd4j.linalg.api.shape
Methods in org.nd4j.linalg.api.shape that return INDArray Modifier and Type Method Description static INDArrayShape. ndArrayDimFromInt(int... dimensions)Create an INDArray to represent the (possibly null) int[] dimensions.static INDArrayShape. newShapeNoCopy(INDArray arr, int[] newShape, boolean isFOrder)static INDArrayShape. newShapeNoCopy(INDArray arr, long[] newShape, boolean isFOrder)A port of numpy's reshaping algorithm that leverages no copy where possible and returns null if the reshape couldn't happen without copyingstatic INDArrayShape. toMmulCompatible(INDArray input)This method is used in DL4J LSTM implementationstatic INDArrayShape. toOffsetZero(INDArray arr)Create a copy of the matrix where the new offset is zerostatic INDArrayShape. toOffsetZeroCopy(INDArray arr)Create a copy of the ndarray where the new offset is zerostatic INDArrayShape. toOffsetZeroCopy(INDArray arr, char order)Create a copy of the ndarray where the new offset is zero, and has specified orderstatic INDArrayShape. toOffsetZeroCopyAnyOrder(INDArray arr)Create a copy of the ndarray where the new offset is zero.Methods in org.nd4j.linalg.api.shape with parameters of type INDArray Modifier and Type Method Description static voidShape. assertBroadcastable(@NonNull INDArray x, @NonNull INDArray y)static voidShape. assertBroadcastable(String op, INDArray first, INDArray second, INDArray result)Assert that the broadcast operationresult = first.op(second)is valid, given the shapes of first, second, and result.
Throws an exception otherwisestatic doubleShape. getDouble(INDArray arr, int[] indices)Get a double based on the array and given indicesstatic doubleShape. getDouble(INDArray arr, long... indices)static longShape. getLong(INDArray arr, long... indices)static long[]Shape. getMaxShape(INDArray... inputs)Return the shape of the largest length array based on the inputstatic charShape. getOrder(INDArray arr)Infer the order for the ndarray based on the array's stridesstatic booleanShape. hasDefaultStridesForShape(INDArray input)static long[]Shape. ind2sub(INDArray arr, long index)Convert a linear index to the equivalent nd index based on the shape of the specified ndarray.static long[]Shape. ind2subC(INDArray arr, long index)Convert a linear index to the equivalent nd index based on the shape of the specified ndarray.static booleanShape. isContiguousInBuffer(INDArray in)Are the elements in the buffer contiguous for this NDArray?static voidShape. iterate(INDArray arr, INDArray arr2, CoordinateFunction coordinateFunction)Iterate over 2 coordinate spaces given 2 arraysstatic voidShape. iterate(INDArray arr, CoordinateFunction coordinateFunction)Iterate over 2 coordinate spaces given 2 arraysstatic INDArrayShape. newShapeNoCopy(INDArray arr, int[] newShape, boolean isFOrder)static INDArrayShape. newShapeNoCopy(INDArray arr, long[] newShape, boolean isFOrder)A port of numpy's reshaping algorithm that leverages no copy where possible and returns null if the reshape couldn't happen without copyingstatic long[]Shape. reductionShape(INDArray x, int[] dimension, boolean newFormat, boolean keepDims)Calculate the shape of the returned array, for a reduction along dimensionstatic StringShape. shapeToString(INDArray arr)Prints the shape for this shape informationstatic StringShape. shapeToStringShort(INDArray arr)static booleanShape. strideDescendingCAscendingF(INDArray array)Check if strides are in order suitable for non-strided mmul etc.static INDArrayShape. toMmulCompatible(INDArray input)This method is used in DL4J LSTM implementationstatic INDArrayShape. toOffsetZero(INDArray arr)Create a copy of the matrix where the new offset is zerostatic INDArrayShape. toOffsetZeroCopy(INDArray arr)Create a copy of the ndarray where the new offset is zerostatic INDArrayShape. toOffsetZeroCopy(INDArray arr, char order)Create a copy of the ndarray where the new offset is zero, and has specified orderstatic INDArrayShape. toOffsetZeroCopyAnyOrder(INDArray arr)Create a copy of the ndarray where the new offset is zero. -
Uses of INDArray in org.nd4j.linalg.cache
Methods in org.nd4j.linalg.cache with parameters of type INDArray Modifier and Type Method Description Pair<DataBuffer,DataBuffer>TADManager. getTADOnlyShapeInfo(INDArray array, int... dimension)This method returns TAD shapeInfo and all offsets for specified tensor and dimensions.Constructors in org.nd4j.linalg.cache with parameters of type INDArray Constructor Description TadDescriptor(INDArray array, int[] dimension)Pass in an ndarray to get the databuffer and the appropriate dimensions -
Uses of INDArray in org.nd4j.linalg.checkutil
Methods in org.nd4j.linalg.checkutil that return INDArray Modifier and Type Method Description static INDArrayCheckUtil. convertFromApacheMatrix(org.apache.commons.math3.linear.RealMatrix matrix, DataType dataType)Methods in org.nd4j.linalg.checkutil that return types with arguments of type INDArray Modifier and Type Method Description static List<Pair<INDArray,String>>NDArrayCreationUtil. get3dPermutedWithShape(int seed, int[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. get3dPermutedWithShape(long seed, long[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. get3dReshapedWithShape(int seed, int[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. get3dReshapedWithShape(long seed, long[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. get3dSubArraysWithShape(int seed, int[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. get3dSubArraysWithShape(long seed, long[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. get3dTensorAlongDimensionWithShape(int seed, int[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. get3dTensorAlongDimensionWithShape(long seed, long[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. get4dPermutedWithShape(int seed, int[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. get4dReshapedWithShape(int seed, int[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. get4dSubArraysWithShape(int seed, int[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. get4dTensorAlongDimensionWithShape(int seed, int[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. get5dPermutedWithShape(int seed, int[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. get5dReshapedWithShape(int seed, int[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. get5dSubArraysWithShape(int seed, int[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. get5dTensorAlongDimensionWithShape(int seed, int[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. get6dPermutedWithShape(int seed, int[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. get6dReshapedWithShape(int seed, int[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. get6dSubArraysWithShape(int seed, int[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. getAll3dTestArraysWithShape(int seed, int[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. getAll3dTestArraysWithShape(long seed, long[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. getAll4dTestArraysWithShape(int seed, int[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. getAll4dTestArraysWithShape(int seed, long[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. getAll5dTestArraysWithShape(int seed, int[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. getAll6dTestArraysWithShape(int seed, int[] shape, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. getAllTestMatricesWithShape(char ordering, int rows, int cols, int seed, DataType dataType)Get an array of INDArrays (2d) all with the specified shape.static List<Pair<INDArray,String>>NDArrayCreationUtil. getAllTestMatricesWithShape(long rows, long cols, long seed, DataType dataType)Get an array of INDArrays (2d) all with the specified shape.static Pair<INDArray,String>NDArrayCreationUtil. getPermutedWithShape(char ordering, long rows, long cols, long seed, DataType dataType)static Pair<INDArray,String>NDArrayCreationUtil. getPermutedWithShape(long rows, long cols, long seed, DataType dataType)static Pair<INDArray,String>NDArrayCreationUtil. getReshapedWithShape(char ordering, long rows, long cols, long seed, DataType dataType)static Pair<INDArray,String>NDArrayCreationUtil. getReshapedWithShape(long rows, long cols, long seed, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. getSubMatricesWithShape(char ordering, long rows, long cols, long seed, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. getSubMatricesWithShape(long rows, long cols, long seed, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. getTensorAlongDimensionMatricesWithShape(char ordering, long rows, long cols, long seed, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. getTensorAlongDimensionMatricesWithShape(long rows, long cols, long seed, DataType dataType)static List<Pair<INDArray,String>>NDArrayCreationUtil. getTestMatricesWithVaryingShapes(int rank, char order, DataType dataType)Test utility to sweep shapes given a rank Given a rank will generate random test matrices that will cover all cases of a shape with a '1' anywhere in the shape as well a shape with random ints that are not 0 or 1 eg.static Pair<INDArray,String>NDArrayCreationUtil. getTransposedMatrixWithShape(char ordering, int rows, int cols, int seed, DataType dataType)static Pair<INDArray,String>NDArrayCreationUtil. getTransposedMatrixWithShape(long rows, long cols, long seed, DataType dataType)Methods in org.nd4j.linalg.checkutil with parameters of type INDArray Modifier and Type Method Description static booleanCheckUtil. checkAdd(INDArray first, INDArray second, double maxRelativeDifference, double minAbsDifference)Same as checkMmul, but for matrix additionstatic booleanCheckUtil. checkDivManually(INDArray first, INDArray second, double maxRelativeDifference, double minAbsDifference)static booleanCheckUtil. checkEntries(org.apache.commons.math3.linear.RealMatrix rmResult, INDArray result, double maxRelativeDifference, double minAbsDifference)static booleanCheckUtil. checkEntries(INDArray expected, INDArray actual, double maxRelativeDifference, double minAbsDifference)static booleanCheckUtil. checkGemm(INDArray a, INDArray b, INDArray c, boolean transposeA, boolean transposeB, double alpha, double beta, double maxRelativeDifference, double minAbsDifference)static booleanCheckUtil. checkMmul(INDArray first, INDArray second, double maxRelativeDifference, double minAbsDifference)Check first.mmul(second) using Apache commons math mmul.static booleanCheckUtil. checkMulManually(INDArray first, INDArray second, double maxRelativeDifference, double minAbsDifference)static booleanCheckUtil. checkSubtract(INDArray first, INDArray second, double maxRelativeDifference, double minAbsDifference)Same as checkMmul, but for matrix subtractionstatic org.apache.commons.math3.linear.RealMatrixCheckUtil. convertToApacheMatrix(INDArray matrix)static voidCheckUtil. printFailureDetails(INDArray first, INDArray second, org.apache.commons.math3.linear.RealMatrix expected, INDArray actual, INDArray onCopies, String op)static voidCheckUtil. printFailureDetails(INDArray first, INDArray second, INDArray expected, INDArray actual, INDArray onCopies, String op)static voidCheckUtil. printGemmFailureDetails(INDArray a, INDArray b, INDArray c, boolean transposeA, boolean transposeB, double alpha, double beta, org.apache.commons.math3.linear.RealMatrix expected, INDArray actual, INDArray onCopies)static voidCheckUtil. printMatrixFullPrecision(INDArray matrix)static voidCheckUtil. printNDArrayHeader(INDArray array) -
Uses of INDArray in org.nd4j.linalg.compression
Methods in org.nd4j.linalg.compression that return INDArray Modifier and Type Method Description INDArrayBasicNDArrayCompressor. compress(double[] array)This method returns compressed INDArray instance which contains JVM array passed inINDArrayBasicNDArrayCompressor. compress(float[] array)This method returns compressed INDArray instance which contains JVM array passed inINDArrayBasicNDArrayCompressor. compress(INDArray array)INDArrayBasicNDArrayCompressor. compress(INDArray array, String algorithm)Returns a compressed version of the given ndarrayINDArrayNDArrayCompressor. compress(double[] data)This method creates compressed INDArray from Java double array, skipping usual INDArray instantiation routines Please note: This method compresses input data as vectorINDArrayNDArrayCompressor. compress(double[] data, int[] shape, char order)This method creates compressed INDArray from Java double array, skipping usual INDArray instantiation routinesINDArrayNDArrayCompressor. compress(float[] data)This method creates compressed INDArray from Java float array, skipping usual INDArray instantiation routines Please note: This method compresses input data as vectorINDArrayNDArrayCompressor. compress(float[] data, int[] shape, char order)This method creates compressed INDArray from Java float array, skipping usual INDArray instantiation routinesINDArrayNDArrayCompressor. compress(INDArray array)This method returns compressed copy of referenced arrayINDArrayBasicNDArrayCompressor. decompress(INDArray array)INDArrayNDArrayCompressor. decompress(INDArray array)This method returns decompressed copy of referenced arrayINDArrayAbstractStorage. get(T key)Get object from the storage, by keyMethods in org.nd4j.linalg.compression with parameters of type INDArray Modifier and Type Method Description voidBasicNDArrayCompressor. autoDecompress(INDArray array)voidBasicNDArrayCompressor. autoDecompress(INDArray... arrays)Decompress several ndarraysINDArrayBasicNDArrayCompressor. compress(INDArray array)INDArrayBasicNDArrayCompressor. compress(INDArray array, String algorithm)Returns a compressed version of the given ndarrayINDArrayNDArrayCompressor. compress(INDArray array)This method returns compressed copy of referenced arrayvoidBasicNDArrayCompressor. compressi(INDArray array)In place compression of the passed in ndarray with the default compression algorithmvoidBasicNDArrayCompressor. compressi(INDArray array, String algorithm)In place Compress the given ndarray with the given algorithmvoidNDArrayCompressor. compressi(INDArray array)Inplace compression of INDArrayINDArrayBasicNDArrayCompressor. decompress(INDArray array)INDArrayNDArrayCompressor. decompress(INDArray array)This method returns decompressed copy of referenced arrayvoidBasicNDArrayCompressor. decompressi(INDArray array)in place decompression of the given ndarray.voidNDArrayCompressor. decompressi(INDArray array)Inplace decompression of INDArrayvoidAbstractStorage. store(T key, INDArray object)Store object into storagebooleanAbstractStorage. storeIfAbsent(T key, INDArray object)Store object into storage, if it doesn't exist -
Uses of INDArray in org.nd4j.linalg.convolution
Methods in org.nd4j.linalg.convolution that return INDArray Modifier and Type Method Description static INDArrayConvolution. col2im(INDArray col, int[] stride, int[] padding, int height, int width)static INDArrayConvolution. col2im(INDArray col, int sH, int sW, int ph, int pW, int kH, int kW)Rearrange matrix columns into blocksstatic INDArrayConvolution. col2im(INDArray col, INDArray z, int sH, int sW, int pH, int pW, int kH, int kW, int dH, int dW)static INDArrayOldConvolution. col2im(INDArray col, int[] stride, int[] padding, int height, int width)static INDArrayOldConvolution. col2im(INDArray col, int sy, int sx, int ph, int pw, int h, int w)Rearrange matrix columns into blocksINDArrayBaseConvolution. conv2d(INDArray input, INDArray kernel, Convolution.Type type)2d convolution (aka the last 2 dimensionsstatic INDArrayConvolution. conv2d(INDArray input, INDArray kernel, Convolution.Type type)2d convolution (aka the last 2 dimensionsINDArrayConvolutionInstance. conv2d(INDArray input, INDArray kernel, Convolution.Type type)2d convolution (aka the last 2 dimensionsINDArrayBaseConvolution. convn(INDArray input, INDArray kernel, Convolution.Type type)ND Convolutionstatic INDArrayConvolution. convn(INDArray input, INDArray kernel, Convolution.Type type)ND Convolutionstatic INDArrayConvolution. convn(INDArray input, INDArray kernel, Convolution.Type type, int[] axes)ND ConvolutionINDArrayConvolutionInstance. convn(INDArray input, INDArray kernel, Convolution.Type type)ND ConvolutionINDArrayConvolutionInstance. convn(INDArray input, INDArray kernel, Convolution.Type type, int[] axes)ND ConvolutionINDArrayDefaultConvolutionInstance. convn(INDArray input, INDArray kernel, Convolution.Type type, int[] axes)ND Convolutionstatic INDArrayConvolution. im2col(INDArray img, int[] kernel, int[] stride, int[] padding)static INDArrayConvolution. im2col(INDArray img, int kh, int kw, int sy, int sx, int ph, int pw, boolean isSameMode)Implement column formatted imagesstatic INDArrayConvolution. im2col(INDArray img, int kh, int kw, int sy, int sx, int ph, int pw, boolean isSameMode, INDArray out)static INDArrayConvolution. im2col(INDArray img, int kh, int kw, int sy, int sx, int ph, int pw, int pval, boolean isSameMode)Implement column formatted imagesstatic INDArrayConvolution. im2col(INDArray img, int kh, int kw, int sy, int sx, int ph, int pw, int dh, int dw, boolean isSameMode)static INDArrayConvolution. im2col(INDArray img, int kh, int kw, int sy, int sx, int ph, int pw, int dH, int dW, boolean isSameMode, INDArray out)Execute im2col.static INDArrayOldConvolution. im2col(INDArray img, int[] kernel, int[] stride, int[] padding)static INDArrayOldConvolution. im2col(INDArray img, int kh, int kw, int sy, int sx, int ph, int pw, int pval, boolean coverAll)Implement column formatted imagesstatic INDArrayConvolution. pooling2D(INDArray img, int kh, int kw, int sy, int sx, int ph, int pw, int dh, int dw, boolean isSameMode, Pooling2D.Pooling2DType type, Pooling2D.Divisor divisor, double extra, int virtualHeight, int virtualWidth, INDArray out)Pooling 2d implementationMethods in org.nd4j.linalg.convolution with parameters of type INDArray Modifier and Type Method Description static INDArrayConvolution. col2im(INDArray col, int[] stride, int[] padding, int height, int width)static INDArrayConvolution. col2im(INDArray col, int sH, int sW, int ph, int pW, int kH, int kW)Rearrange matrix columns into blocksstatic INDArrayConvolution. col2im(INDArray col, INDArray z, int sH, int sW, int pH, int pW, int kH, int kW, int dH, int dW)static INDArrayOldConvolution. col2im(INDArray col, int[] stride, int[] padding, int height, int width)static INDArrayOldConvolution. col2im(INDArray col, int sy, int sx, int ph, int pw, int h, int w)Rearrange matrix columns into blocksINDArrayBaseConvolution. conv2d(INDArray input, INDArray kernel, Convolution.Type type)2d convolution (aka the last 2 dimensionsstatic INDArrayConvolution. conv2d(INDArray input, INDArray kernel, Convolution.Type type)2d convolution (aka the last 2 dimensionsINDArrayConvolutionInstance. conv2d(INDArray input, INDArray kernel, Convolution.Type type)2d convolution (aka the last 2 dimensionsINDArrayBaseConvolution. convn(INDArray input, INDArray kernel, Convolution.Type type)ND Convolutionstatic INDArrayConvolution. convn(INDArray input, INDArray kernel, Convolution.Type type)ND Convolutionstatic INDArrayConvolution. convn(INDArray input, INDArray kernel, Convolution.Type type, int[] axes)ND ConvolutionINDArrayConvolutionInstance. convn(INDArray input, INDArray kernel, Convolution.Type type)ND ConvolutionINDArrayConvolutionInstance. convn(INDArray input, INDArray kernel, Convolution.Type type, int[] axes)ND ConvolutionINDArrayDefaultConvolutionInstance. convn(INDArray input, INDArray kernel, Convolution.Type type, int[] axes)ND Convolutionstatic INDArrayConvolution. im2col(INDArray img, int[] kernel, int[] stride, int[] padding)static INDArrayConvolution. im2col(INDArray img, int kh, int kw, int sy, int sx, int ph, int pw, boolean isSameMode)Implement column formatted imagesstatic INDArrayConvolution. im2col(INDArray img, int kh, int kw, int sy, int sx, int ph, int pw, boolean isSameMode, INDArray out)static INDArrayConvolution. im2col(INDArray img, int kh, int kw, int sy, int sx, int ph, int pw, int pval, boolean isSameMode)Implement column formatted imagesstatic INDArrayConvolution. im2col(INDArray img, int kh, int kw, int sy, int sx, int ph, int pw, int dh, int dw, boolean isSameMode)static INDArrayConvolution. im2col(INDArray img, int kh, int kw, int sy, int sx, int ph, int pw, int dH, int dW, boolean isSameMode, INDArray out)Execute im2col.static INDArrayOldConvolution. im2col(INDArray img, int[] kernel, int[] stride, int[] padding)static INDArrayOldConvolution. im2col(INDArray img, int kh, int kw, int sy, int sx, int ph, int pw, int pval, boolean coverAll)Implement column formatted imagesstatic INDArrayConvolution. pooling2D(INDArray img, int kh, int kw, int sy, int sx, int ph, int pw, int dh, int dw, boolean isSameMode, Pooling2D.Pooling2DType type, Pooling2D.Divisor divisor, double extra, int virtualHeight, int virtualWidth, INDArray out)Pooling 2d implementation -
Uses of INDArray in org.nd4j.linalg.dataset
Methods in org.nd4j.linalg.dataset that return INDArray Modifier and Type Method Description INDArrayDataSet. exampleMaxs()INDArrayDataSet. exampleMeans()INDArrayDataSet. exampleSums()INDArrayDataSet. getFeatures()INDArray[]MultiDataSet. getFeatures()INDArrayMultiDataSet. getFeatures(int index)INDArrayDataSet. getFeaturesMaskArray()INDArrayMultiDataSet. getFeaturesMaskArray(int index)INDArray[]MultiDataSet. getFeaturesMaskArrays()INDArrayDataSet. getLabels()Returns the labels for the datasetINDArray[]MultiDataSet. getLabels()INDArrayMultiDataSet. getLabels(int index)INDArrayDataSet. getLabelsMaskArray()INDArrayMultiDataSet. getLabelsMaskArray(int index)INDArray[]MultiDataSet. getLabelsMaskArrays()Methods in org.nd4j.linalg.dataset with parameters of type INDArray Modifier and Type Method Description voidDataSet. addFeatureVector(INDArray toAdd)Adds a feature for each example on to the current feature vectorvoidDataSet. addFeatureVector(INDArray feature, int example)The feature to add, and the example/row numberList<String>DataSet. getLabelNames(INDArray idxs)voidDataSet. setFeatures(INDArray features)voidMultiDataSet. setFeatures(int idx, INDArray features)voidMultiDataSet. setFeatures(INDArray[] features)voidDataSet. setFeaturesMaskArray(INDArray featuresMask)voidMultiDataSet. setFeaturesMaskArray(int idx, INDArray maskArray)voidMultiDataSet. setFeaturesMaskArrays(INDArray[] maskArrays)voidDataSet. setLabels(INDArray labels)voidMultiDataSet. setLabels(int idx, INDArray labels)voidMultiDataSet. setLabels(INDArray[] labels)voidDataSet. setLabelsMaskArray(INDArray labelsMask)voidMultiDataSet. setLabelsMaskArray(int idx, INDArray labelsMaskArray)voidMultiDataSet. setLabelsMaskArray(INDArray[] labelsMaskArrays)Constructors in org.nd4j.linalg.dataset with parameters of type INDArray Constructor Description DataSet(INDArray first, INDArray second)Creates a dataset with the specified input matrix and labelsDataSet(INDArray features, INDArray labels, INDArray featuresMask, INDArray labelsMask)Create a dataset with the specified input INDArray and labels (output) INDArray, plus (optionally) mask arrays for the features and labelsMultiDataSet(INDArray[] features, INDArray[] labels)MultiDataSet constructor with no mask arraysMultiDataSet(INDArray[] features, INDArray[] labels, INDArray[] featuresMaskArrays, INDArray[] labelsMaskArrays)MultiDataSet(INDArray[] features, INDArray[] labels, INDArray[] featuresMaskArrays, INDArray[] labelsMaskArrays, List<Serializable> exampleMetaData)MultiDataSet(INDArray features, INDArray labels)MultiDataSet constructor with single features/labels input, no mask arraysMultiDataSet(INDArray features, INDArray labels, INDArray featuresMask, INDArray labelsMask)MultiDataSet constructor with single features/labels input, single mask arrays -
Uses of INDArray in org.nd4j.linalg.dataset.api
Methods in org.nd4j.linalg.dataset.api that return INDArray Modifier and Type Method Description INDArrayDataSet. exampleMaxs()INDArrayDataSet. exampleMeans()INDArrayDataSet. exampleSums()INDArrayDataSet. getFeatures()Returns the features array for the DataSetINDArray[]MultiDataSet. getFeatures()Get all of the input features, as an array of INDArraysINDArrayMultiDataSet. getFeatures(int index)Get a single feature/input arrayINDArrayDataSet. getFeaturesMaskArray()Input mask array: a mask array for input, where each value is in {0,1} in order to specify whether an input is actually present or not.INDArrayMultiDataSet. getFeaturesMaskArray(int index)Get the specified feature mask array.INDArray[]MultiDataSet. getFeaturesMaskArrays()Get the feature mask arrays.INDArrayDataSet. getLabels()INDArray[]MultiDataSet. getLabels()Get all of the labels, as an array of INDArraysINDArrayMultiDataSet. getLabels(int index)Get a single label/output arrayINDArrayDataSet. getLabelsMaskArray()Labels (output) mask array: a mask array for input, where each value is in {0,1} in order to specify whether an output is actually present or not.INDArrayMultiDataSet. getLabelsMaskArray(int index)Get the specified label mask array.INDArray[]MultiDataSet. getLabelsMaskArrays()Get the labels mask arrays.static INDArrayDataSetUtil. mergeMasks2d(long[] outShape, INDArray[] arrays, INDArray[] masks)static INDArrayDataSetUtil. mergeMasks4d(INDArray[] featuresOrLabels, INDArray[] masks)static INDArrayDataSetUtil. mergePerOutputMasks2d(long[] outShape, INDArray[][] arrays, INDArray[][] masks, int inOutIdx)static INDArrayDataSetUtil. mergePerOutputMasks2d(long[] outShape, INDArray[] arrays, INDArray[] masks)Deprecated.static INDArrayDataSetUtil. tailor2d(@NonNull INDArray data, INDArray mask)static INDArrayDataSetUtil. tailor2d(@NonNull DataSet dataSet, boolean areFeatures)static INDArrayDataSetUtil. tailor3d2d(@NonNull INDArray data, INDArray mask)static INDArrayDataSetUtil. tailor3d2d(DataSet dataset, boolean areFeatures)Deprecated.static INDArrayDataSetUtil. tailor4d2d(@NonNull INDArray data)static INDArrayDataSetUtil. tailor4d2d(DataSet dataset, boolean areFeatures)Methods in org.nd4j.linalg.dataset.api that return types with arguments of type INDArray Modifier and Type Method Description static Pair<INDArray,INDArray>DataSetUtil. merge2d(@NonNull INDArray[][] arrays, INDArray[][] masks, int inOutIdx)Merge the specified 2d arrays and masks.static Pair<INDArray,INDArray>DataSetUtil. merge2d(@NonNull INDArray[][] arrays, INDArray[][] masks, int inOutIdx)Merge the specified 2d arrays and masks.static Pair<INDArray,INDArray>DataSetUtil. merge2d(INDArray[] arrays, INDArray[] masks)Merge the specified 2d arrays and masks.static Pair<INDArray,INDArray>DataSetUtil. merge2d(INDArray[] arrays, INDArray[] masks)Merge the specified 2d arrays and masks.static Pair<INDArray,INDArray>DataSetUtil. merge4d(INDArray[][] arrays, INDArray[][] masks, int inOutIdx)Merge the specified 4d arrays and masks.static Pair<INDArray,INDArray>DataSetUtil. merge4d(INDArray[][] arrays, INDArray[][] masks, int inOutIdx)Merge the specified 4d arrays and masks.static Pair<INDArray,INDArray>DataSetUtil. merge4d(INDArray[] arrays, INDArray[] masks)Merge the specified 4d arrays and masks.static Pair<INDArray,INDArray>DataSetUtil. merge4d(INDArray[] arrays, INDArray[] masks)Merge the specified 4d arrays and masks.static Pair<INDArray,INDArray>DataSetUtil. mergeFeatures(@NonNull INDArray[] featuresToMerge, INDArray[] featureMasksToMerge)Merge the specified features and mask arrays (i.e., concatenate the examples)static Pair<INDArray,INDArray>DataSetUtil. mergeFeatures(@NonNull INDArray[] featuresToMerge, INDArray[] featureMasksToMerge)Merge the specified features and mask arrays (i.e., concatenate the examples)static Pair<INDArray,INDArray>DataSetUtil. mergeFeatures(INDArray[][] featuresToMerge, INDArray[][] featureMasksToMerge, int inOutIdx)Extract out the specified column, and merge the specified features and mask arrays (i.e., concatenate the examples)static Pair<INDArray,INDArray>DataSetUtil. mergeFeatures(INDArray[][] featuresToMerge, INDArray[][] featureMasksToMerge, int inOutIdx)Extract out the specified column, and merge the specified features and mask arrays (i.e., concatenate the examples)static Pair<INDArray,INDArray>DataSetUtil. mergeLabels(@NonNull INDArray[][] labelsToMerge, INDArray[][] labelMasksToMerge, int inOutIdx)Extract out the specified column, and merge the specified label and label mask arrays (i.e., concatenate the examples)static Pair<INDArray,INDArray>DataSetUtil. mergeLabels(@NonNull INDArray[][] labelsToMerge, INDArray[][] labelMasksToMerge, int inOutIdx)Extract out the specified column, and merge the specified label and label mask arrays (i.e., concatenate the examples)static Pair<INDArray,INDArray>DataSetUtil. mergeLabels(INDArray[] labelsToMerge, INDArray[] labelMasksToMerge)Merge the specified labels and label mask arrays (i.e., concatenate the examples)static Pair<INDArray,INDArray>DataSetUtil. mergeLabels(INDArray[] labelsToMerge, INDArray[] labelMasksToMerge)Merge the specified labels and label mask arrays (i.e., concatenate the examples)static Pair<INDArray,INDArray>DataSetUtil. mergeTimeSeries(INDArray[][] arrays, INDArray[][] masks, int inOutIdx)Merge the specified time series (3d) arrays and masks.static Pair<INDArray,INDArray>DataSetUtil. mergeTimeSeries(INDArray[][] arrays, INDArray[][] masks, int inOutIdx)Merge the specified time series (3d) arrays and masks.static Pair<INDArray,INDArray>DataSetUtil. mergeTimeSeries(INDArray[] arrays, INDArray[] masks)Merge the specified time series (3d) arrays and masks.static Pair<INDArray,INDArray>DataSetUtil. mergeTimeSeries(INDArray[] arrays, INDArray[] masks)Merge the specified time series (3d) arrays and masks.Methods in org.nd4j.linalg.dataset.api with parameters of type INDArray Modifier and Type Method Description voidDataSet. addFeatureVector(INDArray toAdd)voidDataSet. addFeatureVector(INDArray feature, int example)List<String>DataSet. getLabelNames(INDArray idxs)static Pair<INDArray,INDArray>DataSetUtil. merge2d(@NonNull INDArray[][] arrays, INDArray[][] masks, int inOutIdx)Merge the specified 2d arrays and masks.static Pair<INDArray,INDArray>DataSetUtil. merge2d(INDArray[] arrays, INDArray[] masks)Merge the specified 2d arrays and masks.static Pair<INDArray,INDArray>DataSetUtil. merge4d(INDArray[][] arrays, INDArray[][] masks, int inOutIdx)Merge the specified 4d arrays and masks.static Pair<INDArray,INDArray>DataSetUtil. merge4d(INDArray[] arrays, INDArray[] masks)Merge the specified 4d arrays and masks.static Pair<INDArray[],INDArray[]>DataSetUtil. mergeFeatures(@NonNull INDArray[][] featuresToMerge, INDArray[][] featureMasksToMerge)Merge all of the features arrays into one minibatch.static Pair<INDArray,INDArray>DataSetUtil. mergeFeatures(@NonNull INDArray[] featuresToMerge, INDArray[] featureMasksToMerge)Merge the specified features and mask arrays (i.e., concatenate the examples)static Pair<INDArray,INDArray>DataSetUtil. mergeFeatures(INDArray[][] featuresToMerge, INDArray[][] featureMasksToMerge, int inOutIdx)Extract out the specified column, and merge the specified features and mask arrays (i.e., concatenate the examples)static Pair<INDArray,INDArray>DataSetUtil. mergeLabels(@NonNull INDArray[][] labelsToMerge, INDArray[][] labelMasksToMerge, int inOutIdx)Extract out the specified column, and merge the specified label and label mask arrays (i.e., concatenate the examples)static Pair<INDArray,INDArray>DataSetUtil. mergeLabels(INDArray[] labelsToMerge, INDArray[] labelMasksToMerge)Merge the specified labels and label mask arrays (i.e., concatenate the examples)static INDArrayDataSetUtil. mergeMasks2d(long[] outShape, INDArray[] arrays, INDArray[] masks)static INDArrayDataSetUtil. mergeMasks4d(INDArray[] featuresOrLabels, INDArray[] masks)static INDArrayDataSetUtil. mergePerOutputMasks2d(long[] outShape, INDArray[][] arrays, INDArray[][] masks, int inOutIdx)static INDArrayDataSetUtil. mergePerOutputMasks2d(long[] outShape, INDArray[] arrays, INDArray[] masks)Deprecated.static Pair<INDArray,INDArray>DataSetUtil. mergeTimeSeries(INDArray[][] arrays, INDArray[][] masks, int inOutIdx)Merge the specified time series (3d) arrays and masks.static Pair<INDArray,INDArray>DataSetUtil. mergeTimeSeries(INDArray[] arrays, INDArray[] masks)Merge the specified time series (3d) arrays and masks.voidDataSet. setFeatures(INDArray features)Set the features array for the DataSetvoidMultiDataSet. setFeatures(int idx, INDArray features)Set a single features array (by index) for the MultiDataSetvoidMultiDataSet. setFeatures(INDArray[] features)Set all of the features arrays for the MultiDataSetvoidDataSet. setFeaturesMaskArray(INDArray inputMask)Set the features mask array in this DataSetvoidMultiDataSet. setFeaturesMaskArray(int idx, INDArray maskArray)Set a single feature mask array by indexvoidMultiDataSet. setFeaturesMaskArrays(INDArray[] maskArrays)Set the feature mask arraysvoidDataSet. setLabels(INDArray labels)voidMultiDataSet. setLabels(int idx, INDArray labels)Set a single labels array (by index) for the MultiDataSetvoidMultiDataSet. setLabels(INDArray[] labels)Set all of the labels arrays for the MultiDataSetvoidDataSet. setLabelsMaskArray(INDArray labelsMask)Set the labels mask array in this data setvoidMultiDataSet. setLabelsMaskArray(int idx, INDArray labelsMaskArray)Set a single labels mask array by indexvoidMultiDataSet. setLabelsMaskArray(INDArray[] labels)Set the labels mask arraysstatic voidDataSetUtil. setMaskedValuesToZero(INDArray data, INDArray mask)static INDArrayDataSetUtil. tailor2d(@NonNull INDArray data, INDArray mask)static INDArrayDataSetUtil. tailor3d2d(@NonNull INDArray data, INDArray mask)static INDArrayDataSetUtil. tailor4d2d(@NonNull INDArray data) -
Uses of INDArray in org.nd4j.linalg.dataset.api.iterator
Methods in org.nd4j.linalg.dataset.api.iterator that return INDArray Modifier and Type Method Description INDArrayStandardScaler. getMean()Deprecated.INDArrayStandardScaler. getStd()Deprecated. -
Uses of INDArray in org.nd4j.linalg.dataset.api.iterator.fetcher
Methods in org.nd4j.linalg.dataset.api.iterator.fetcher that return INDArray Modifier and Type Method Description protected INDArrayBaseDataFetcher. createInputMatrix(int numRows)Creates a feature vectorprotected INDArrayBaseDataFetcher. createOutputMatrix(int numRows)protected INDArrayBaseDataFetcher. createOutputVector(int outcomeLabel)Creates an output label matrix -
Uses of INDArray in org.nd4j.linalg.dataset.api.preprocessor
Fields in org.nd4j.linalg.dataset.api.preprocessor declared as INDArray Modifier and Type Field Description static INDArrayVGG16ImagePreProcessor. VGG_MEAN_OFFSET_BGRstatic INDArrayVGG16ImagePreProcessor. VGG_MEAN_OFFSET_BGR_FLOATstatic INDArrayVGG16ImagePreProcessor. VGG_MEAN_OFFSET_BGR_FLOAT16Methods in org.nd4j.linalg.dataset.api.preprocessor that return INDArray Modifier and Type Method Description INDArrayMultiNormalizerStandardize. getFeatureMean(int input)INDArrayMultiNormalizerStandardize. getFeatureStd(int input)INDArrayMultiNormalizerMinMaxScaler. getLabelMax(int output)INDArrayNormalizerMinMaxScaler. getLabelMax()INDArrayMultiNormalizerStandardize. getLabelMean(int output)INDArrayNormalizerStandardize. getLabelMean()INDArrayMultiNormalizerMinMaxScaler. getLabelMin(int output)INDArrayNormalizerMinMaxScaler. getLabelMin()INDArrayMultiNormalizerStandardize. getLabelStd(int output)INDArrayNormalizerStandardize. getLabelStd()INDArrayMultiNormalizerMinMaxScaler. getMax(int input)INDArrayNormalizerMinMaxScaler. getMax()INDArrayNormalizerStandardize. getMean()protected static INDArrayVGG16ImagePreProcessor. getMeanFor(INDArray features)INDArrayMultiNormalizerMinMaxScaler. getMin(int input)INDArrayNormalizerMinMaxScaler. getMin()INDArrayNormalizerStandardize. getStd()Methods in org.nd4j.linalg.dataset.api.preprocessor with parameters of type INDArray Modifier and Type Method Description protected static INDArrayVGG16ImagePreProcessor. getMeanFor(INDArray features)voidImagePreProcessingScaler. preProcess(INDArray features)voidMinMaxStrategy. preProcess(INDArray array, INDArray maskArray, MinMaxStats stats)Normalize a data arrayvoidNormalizerStrategy. preProcess(INDArray array, INDArray maskArray, S stats)Normalize a data arrayvoidStandardizeStrategy. preProcess(INDArray array, INDArray maskArray, DistributionStats stats)Normalize a data arrayvoidVGG16ImagePreProcessor. preProcess(INDArray features)voidMinMaxStrategy. revert(INDArray array, INDArray maskArray, MinMaxStats stats)Denormalize a data arrayvoidNormalizerStrategy. revert(INDArray array, INDArray maskArray, S stats)Denormalize a data arrayvoidStandardizeStrategy. revert(INDArray array, INDArray maskArray, DistributionStats stats)Denormalize a data arrayvoidAbstractDataSetNormalizer. revertFeatures(INDArray features)voidAbstractDataSetNormalizer. revertFeatures(INDArray features, INDArray featuresMask)voidAbstractMultiDataSetNormalizer. revertFeatures(@NonNull INDArray[] features)Undo (revert) the normalization applied by this normalizer to the features arraysvoidAbstractMultiDataSetNormalizer. revertFeatures(@NonNull INDArray[] features, INDArray[] maskArrays)Undo (revert) the normalization applied by this normalizer to the features arraysvoidAbstractMultiDataSetNormalizer. revertFeatures(@NonNull INDArray features, INDArray mask, int input)Undo (revert) the normalization applied by this normalizer to a specific features array.voidDataNormalization. revertFeatures(INDArray features)Undo (revert) the normalization applied by this DataNormalization instance to the specified features arrayvoidDataNormalization. revertFeatures(INDArray features, INDArray featuresMask)Undo (revert) the normalization applied by this DataNormalization instance to the specified features arrayvoidImageMultiPreProcessingScaler. revertFeatures(INDArray[] features)voidImageMultiPreProcessingScaler. revertFeatures(INDArray[] features, INDArray[] featuresMask)voidImagePreProcessingScaler. revertFeatures(INDArray features)voidImagePreProcessingScaler. revertFeatures(INDArray features, INDArray featuresMask)voidMultiDataNormalization. revertFeatures(INDArray[] features)Undo (revert) the normalization applied by this DataNormalization instance to the specified features arrayvoidMultiDataNormalization. revertFeatures(INDArray[] features, INDArray[] featuresMask)Undo (revert) the normalization applied by this DataNormalization instance to the specified features arrayvoidMultiNormalizerHybrid. revertFeatures(@NonNull INDArray[] features)Undo (revert) the normalization applied by this DataNormalization instance to the entire inputs arrayvoidMultiNormalizerHybrid. revertFeatures(@NonNull INDArray[] features, INDArray[] maskArrays)Undo (revert) the normalization applied by this DataNormalization instance to the entire inputs arrayvoidMultiNormalizerHybrid. revertFeatures(@NonNull INDArray[] features, INDArray[] maskArrays, int input)Undo (revert) the normalization applied by this DataNormalization instance to the features of a particular inputvoidVGG16ImagePreProcessor. revertFeatures(INDArray features)voidVGG16ImagePreProcessor. revertFeatures(INDArray features, INDArray featuresMask)voidAbstractDataSetNormalizer. revertLabels(INDArray labels)Undo (revert) the normalization applied by this DataNormalization instance to the specified labels array.voidAbstractDataSetNormalizer. revertLabels(INDArray labels, INDArray labelsMask)voidAbstractMultiDataSetNormalizer. revertLabels(@NonNull INDArray[] labels, INDArray[] labelsMask)Undo (revert) the normalization applied by this normalizer to the labels arrays.voidAbstractMultiDataSetNormalizer. revertLabels(@NonNull INDArray labels, INDArray mask, int output)Undo (revert) the normalization applied by this normalizer to a specific labels array.voidAbstractMultiDataSetNormalizer. revertLabels(INDArray[] labels)Undo (revert) the normalization applied by this DataNormalization instance to the specified labels array.voidDataNormalization. revertLabels(INDArray labels)Undo (revert) the normalization applied by this DataNormalization instance to the specified labels array.voidDataNormalization. revertLabels(INDArray labels, INDArray labelsMask)Undo (revert) the normalization applied by this DataNormalization instance to the specified labels array.voidImageMultiPreProcessingScaler. revertLabels(INDArray[] labels)voidImageMultiPreProcessingScaler. revertLabels(INDArray[] labels, INDArray[] labelsMask)voidImagePreProcessingScaler. revertLabels(INDArray labels)voidImagePreProcessingScaler. revertLabels(INDArray labels, INDArray labelsMask)voidMultiDataNormalization. revertLabels(INDArray[] labels)Undo (revert) the normalization applied by this DataNormalization instance to the specified labels array.voidMultiDataNormalization. revertLabels(INDArray[] labels, INDArray[] labelsMask)Undo (revert) the normalization applied by this DataNormalization instance to the specified labels array.voidMultiNormalizerHybrid. revertLabels(@NonNull INDArray[] labels)Undo (revert) the normalization applied by this DataNormalization instance to the entire outputs arrayvoidMultiNormalizerHybrid. revertLabels(@NonNull INDArray[] labels, INDArray[] maskArrays)Undo (revert) the normalization applied by this DataNormalization instance to the entire outputs arrayvoidMultiNormalizerHybrid. revertLabels(@NonNull INDArray[] labels, INDArray[] maskArrays, int output)Undo (revert) the normalization applied by this DataNormalization instance to the labels of a particular outputvoidVGG16ImagePreProcessor. revertLabels(INDArray labels)voidVGG16ImagePreProcessor. revertLabels(INDArray labels, INDArray labelsMask)voidNormalizerMinMaxScaler. setFeatureStats(@NonNull INDArray featureMin, @NonNull INDArray featureMax)voidNormalizerMinMaxScaler. setLabelStats(@NonNull INDArray labelMin, @NonNull INDArray labelMax)voidNormalizerStandardize. setLabelStats(@NonNull INDArray labelMean, @NonNull INDArray labelStd)voidAbstractDataSetNormalizer. transform(INDArray features)Transform the given INDArrayvoidAbstractDataSetNormalizer. transform(INDArray features, INDArray featuresMask)voidDataNormalization. transform(INDArray features)Transform the datasetvoidDataNormalization. transform(INDArray features, INDArray featuresMask)Transform the features, with an optional mask arrayvoidImagePreProcessingScaler. transform(INDArray features)voidImagePreProcessingScaler. transform(INDArray features, INDArray featuresMask)voidVGG16ImagePreProcessor. transform(INDArray features)voidVGG16ImagePreProcessor. transform(INDArray features, INDArray featuresMask)voidAbstractDataSetNormalizer. transformLabel(INDArray label)Transform the labels.voidAbstractDataSetNormalizer. transformLabel(INDArray label, INDArray labelsMask)voidDataNormalization. transformLabel(INDArray labels)Transform the labels.voidDataNormalization. transformLabel(INDArray labels, INDArray labelsMask)Transform the labels.voidImagePreProcessingScaler. transformLabel(INDArray label)voidImagePreProcessingScaler. transformLabel(INDArray labels, INDArray labelsMask)voidVGG16ImagePreProcessor. transformLabel(INDArray label)voidVGG16ImagePreProcessor. transformLabel(INDArray labels, INDArray labelsMask)Constructors in org.nd4j.linalg.dataset.api.preprocessor with parameters of type INDArray Constructor Description NormalizerStandardize(@NonNull INDArray featureMean, @NonNull INDArray featureStd)NormalizerStandardize(@NonNull INDArray featureMean, @NonNull INDArray featureStd, @NonNull INDArray labelMean, @NonNull INDArray labelStd) -
Uses of INDArray in org.nd4j.linalg.dataset.api.preprocessor.classimbalance
Methods in org.nd4j.linalg.dataset.api.preprocessor.classimbalance that return INDArray Modifier and Type Method Description INDArrayBaseUnderSamplingPreProcessor. adjustMasks(INDArray label, INDArray labelMask, int minorityLabel, double targetDist)Methods in org.nd4j.linalg.dataset.api.preprocessor.classimbalance with parameters of type INDArray Modifier and Type Method Description INDArrayBaseUnderSamplingPreProcessor. adjustMasks(INDArray label, INDArray labelMask, int minorityLabel, double targetDist) -
Uses of INDArray in org.nd4j.linalg.dataset.api.preprocessor.stats
Methods in org.nd4j.linalg.dataset.api.preprocessor.stats that return INDArray Modifier and Type Method Description INDArrayMinMaxStats. getRange()Get the feature wise range for the statistics.Methods in org.nd4j.linalg.dataset.api.preprocessor.stats with parameters of type INDArray Modifier and Type Method Description DistributionStats.BuilderDistributionStats.Builder. add(@NonNull INDArray data, INDArray mask)Add rows of data to the statisticsMinMaxStats.BuilderMinMaxStats.Builder. add(@NonNull INDArray data, INDArray mask)Add rows of data to the statisticsNormalizerStats.Builder<S>NormalizerStats.Builder. add(INDArray data, INDArray mask)Add rows of data to the statisticsConstructors in org.nd4j.linalg.dataset.api.preprocessor.stats with parameters of type INDArray Constructor Description DistributionStats(@NonNull INDArray mean, @NonNull INDArray std)MinMaxStats(@NonNull INDArray lower, @NonNull INDArray upper) -
Uses of INDArray in org.nd4j.linalg.dimensionalityreduction
Methods in org.nd4j.linalg.dimensionalityreduction that return INDArray Modifier and Type Method Description INDArrayPCA. convertBackToFeatures(INDArray data)Take the data that has been transformed to the principal components about the mean and transform it back into the original feature set.INDArrayPCA. convertToComponents(INDArray data)Takes a set of data on each row, with the same number of features as the constructing data and returns the data in the coordinates of the basis set about the mean.static INDArray[]PCA. covarianceMatrix(INDArray in)Returns the covariance matrix of a data set of many records, each with N features.INDArrayPCA. generateGaussianSamples(long count)Generates a set of count random samples with the same variance and mean and eigenvector/values as the data set used to initialize the PCA object, with same number of features N.INDArrayPCA. getCovarianceMatrix()INDArrayPCA. getEigenvalues()INDArrayPCA. getEigenvectors()INDArrayPCA. getMean()static INDArrayPCA. pca(INDArray A, double variance, boolean normalize)Calculates pca reduced value of a matrix, for a given variance.static INDArrayPCA. pca(INDArray A, int nDims, boolean normalize)Calculates pca vectors of a matrix, for a flags number of reduced features returns the reduced feature set The return is a projection of A onto principal nDims components To use the PCA: assume A is the original feature set then project A onto a reduced set of features.static INDArrayPCA. pca_factor(INDArray A, double variance, boolean normalize)Calculates pca vectors of a matrix, for a given variance.static INDArrayPCA. pca_factor(INDArray A, int nDims, boolean normalize)Calculates pca factors of a matrix, for a flags number of reduced features returns the factors to scale observations The return is a factor matrix to reduce (normalized) feature setsstatic INDArrayPCA. pca2(INDArray in, double variance)This method performs a dimensionality reduction, including principal components that cover a fraction of the total variance of the system.static INDArray[]PCA. principalComponents(INDArray cov)Calculates the principal component vectors and their eigenvalues (lambda) for the covariance matrix.INDArrayRandomProjection. project(INDArray data)Create a copy random projection by using matrix product with a random matrixINDArrayRandomProjection. project(INDArray data, INDArray result)Create a copy random projection by using matrix product with a random matrixINDArrayRandomProjection. projecti(INDArray data)Create an in-place random projection by using in-place matrix product with a random matrixINDArrayRandomProjection. projecti(INDArray data, INDArray result)Create an in-place random projection by using in-place matrix product with a random matrixINDArrayPCA. reducedBasis(double variance)Return a reduced basis set that covers a certain fraction of the variance of the dataMethods in org.nd4j.linalg.dimensionalityreduction with parameters of type INDArray Modifier and Type Method Description INDArrayPCA. convertBackToFeatures(INDArray data)Take the data that has been transformed to the principal components about the mean and transform it back into the original feature set.INDArrayPCA. convertToComponents(INDArray data)Takes a set of data on each row, with the same number of features as the constructing data and returns the data in the coordinates of the basis set about the mean.static INDArray[]PCA. covarianceMatrix(INDArray in)Returns the covariance matrix of a data set of many records, each with N features.doublePCA. estimateVariance(INDArray data, int ndims)Estimate the variance of a single record with reduced # of dimensions.static INDArrayPCA. pca(INDArray A, double variance, boolean normalize)Calculates pca reduced value of a matrix, for a given variance.static INDArrayPCA. pca(INDArray A, int nDims, boolean normalize)Calculates pca vectors of a matrix, for a flags number of reduced features returns the reduced feature set The return is a projection of A onto principal nDims components To use the PCA: assume A is the original feature set then project A onto a reduced set of features.static INDArrayPCA. pca_factor(INDArray A, double variance, boolean normalize)Calculates pca vectors of a matrix, for a given variance.static INDArrayPCA. pca_factor(INDArray A, int nDims, boolean normalize)Calculates pca factors of a matrix, for a flags number of reduced features returns the factors to scale observations The return is a factor matrix to reduce (normalized) feature setsstatic INDArrayPCA. pca2(INDArray in, double variance)This method performs a dimensionality reduction, including principal components that cover a fraction of the total variance of the system.static INDArray[]PCA. principalComponents(INDArray cov)Calculates the principal component vectors and their eigenvalues (lambda) for the covariance matrix.INDArrayRandomProjection. project(INDArray data)Create a copy random projection by using matrix product with a random matrixINDArrayRandomProjection. project(INDArray data, INDArray result)Create a copy random projection by using matrix product with a random matrixINDArrayRandomProjection. projecti(INDArray data)Create an in-place random projection by using in-place matrix product with a random matrixINDArrayRandomProjection. projecti(INDArray data, INDArray result)Create an in-place random projection by using in-place matrix product with a random matrixstatic long[]RandomProjection. targetShape(INDArray X, double eps)Compute the target shape of a suitable projection matrixprotected static long[]RandomProjection. targetShape(INDArray X, int targetDimension)Compute the target shape of a suitable projection matrixConstructors in org.nd4j.linalg.dimensionalityreduction with parameters of type INDArray Constructor Description PCA(INDArray dataset)Create a PCA instance with calculated data: covariance, mean, eigenvectors, and eigenvalues. -
Uses of INDArray in org.nd4j.linalg.eigen
Fields in org.nd4j.linalg.eigen declared as INDArray Modifier and Type Field Description static INDArrayEigen. dummyMethods in org.nd4j.linalg.eigen that return INDArray Modifier and Type Method Description static INDArray[]Eigen. eig(INDArray A)Compute the eigenvalues and eigenvectors of a square matrixstatic INDArrayEigen. symmetricGeneralizedEigenvalues(INDArray A)Compute generalized eigenvalues of the problem A x = L x.static INDArrayEigen. symmetricGeneralizedEigenvalues(INDArray A, boolean calculateVectors)Compute generalized eigenvalues of the problem A x = L x.static INDArrayEigen. symmetricGeneralizedEigenvalues(INDArray A, INDArray B)Compute generalized eigenvalues of the problem A x = L B x.static INDArrayEigen. symmetricGeneralizedEigenvalues(INDArray A, INDArray B, boolean calculateVectors)Compute generalized eigenvalues of the problem A x = L B x.Methods in org.nd4j.linalg.eigen with parameters of type INDArray Modifier and Type Method Description static INDArray[]Eigen. eig(INDArray A)Compute the eigenvalues and eigenvectors of a square matrixstatic INDArrayEigen. symmetricGeneralizedEigenvalues(INDArray A)Compute generalized eigenvalues of the problem A x = L x.static INDArrayEigen. symmetricGeneralizedEigenvalues(INDArray A, boolean calculateVectors)Compute generalized eigenvalues of the problem A x = L x.static INDArrayEigen. symmetricGeneralizedEigenvalues(INDArray A, INDArray B)Compute generalized eigenvalues of the problem A x = L B x.static INDArrayEigen. symmetricGeneralizedEigenvalues(INDArray A, INDArray B, boolean calculateVectors)Compute generalized eigenvalues of the problem A x = L B x. -
Uses of INDArray in org.nd4j.linalg.factory
Methods in org.nd4j.linalg.factory that return INDArray Modifier and Type Method Description static INDArrayNd4j. accumulate(@NonNull INDArray... arrays)This method sums given arrays and stores them to a new arraystatic INDArrayNd4j. accumulate(INDArray target, Collection<INDArray> arrays)This method sums given arrays and stores them to a given target arraystatic INDArrayNd4j. accumulate(INDArray target, INDArray[] arrays)This method sums given arrays and stores them to a given target arrayINDArrayNDArrayFactory. accumulate(INDArray target, INDArray... arrays)This method sums given arrays to targetstatic INDArrayBroadcast. add(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast add op.static INDArrayBroadcast. amax(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast absolute max op.static INDArrayBroadcast. amin(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast absolute min op.static INDArrayNd4j. append(INDArray arr, int padAmount, double val, int axis)Append the given array with the specified value size along a particular axis.INDArrayBaseNDArrayFactory. appendBias(INDArray... vectors)Merge the vectors and append a bias.static INDArrayNd4j. appendBias(@NonNull INDArray... vectors)INDArrayNDArrayFactory. appendBias(INDArray... vectors)INDArrayBaseNDArrayFactory. arange(double begin, double end, double step)Array of evenly spaced values.static INDArrayNd4j. arange(double end)Create a 1D array of evenly spaced values between 0 (inclusive) andend(exclusive) with a step size of 1 SeeNd4j.arange(double, double, double)with begin = 0 and step size 1.static INDArrayNd4j. arange(double begin, double end)Create a 1D array of evenly spaced values betweenbegin(inclusive) andend(exclusive) with a step size of 1 SeeNd4j.arange(double, double, double)with step size 1.static INDArrayNd4j. arange(double begin, double end, double step)Create a 1D array of evenly spaced values betweenbegin(inclusive) andend(exclusive) with a step size.INDArrayNDArrayFactory. arange(double begin, double end, double step)Array of evenly spaced values.static INDArrayNd4j. argMax(INDArray arr, @lombok.NonNull int... dimension)Get the maximum values for a dimension.static INDArrayNd4j. argMin(INDArray arr, @lombok.NonNull int... dimension)SeeNd4j.argMax(INDArray, int...)but return minimum values.INDArrayNDArrayFactory. average(Collection<INDArray> arrays)This method averages input arrays, and returns averaged arrayINDArrayNDArrayFactory. average(INDArray[] arrays)This method averages input arrays, and returns averaged arrayINDArrayNDArrayFactory. average(INDArray target, Collection<INDArray> arrays)This method averages input arrays, and returns averaged arrayINDArrayNDArrayFactory. average(INDArray target, INDArray[] arrays)This method averages input arrays, and returns averaged arraystatic INDArrayNd4j. averageAndPropagate(Collection<INDArray> arrays)This method averages input arrays, and returns averaged array.static INDArrayNd4j. averageAndPropagate(INDArray[] arrays)This method averages input arrays, and returns averaged array.static INDArrayNd4j. averageAndPropagate(INDArray target, Collection<INDArray> arrays)This method averages input arrays, and returns averaged array.INDArrayBaseBlasWrapper. axpy(double da, INDArray dx, INDArray dy)INDArrayBaseBlasWrapper. axpy(float da, INDArray dx, INDArray dy)INDArrayBaseBlasWrapper. axpy(Number da, INDArray dx, INDArray dy)INDArrayBlasWrapper. axpy(double da, INDArray dx, INDArray dy)Deprecated.INDArrayBlasWrapper. axpy(float da, INDArray dx, INDArray dy)Deprecated.INDArrayBlasWrapper. axpy(Number da, INDArray dx, INDArray dy)Compute y <- y + x * alphaINDArrayBaseNDArrayFactory. bilinearProducts(INDArray curr, INDArray in)Returns a column vector where each entry is the nth bilinear product of the nth slices of the two tensors.INDArrayNDArrayFactory. bilinearProducts(INDArray curr, INDArray in)Returns a column vector where each entry is the nth bilinear product of the nth slices of the two tensors.static INDArrayNd4j. choice(@NonNull INDArray source, @NonNull INDArray probs, @NonNull INDArray target, Random rng)This method samples value from Source array to Target, with probabilites provided in Probs argumentstatic INDArrayNd4j. choice(INDArray source, INDArray probs, int numSamples)This method returns new INDArray instance, sampled from Source array with probabilities given in Probs using the default random number generator.static INDArrayNd4j. choice(INDArray source, INDArray probs, int numSamples, Random rng)This method returns new INDArray instance, sampled from Source array with probabilities given in Probs.static INDArrayNd4j. choice(INDArray source, INDArray probs, INDArray target)This method samples value from Source array to Target,the default random number generator.INDArrayBaseNDArrayFactory. concat(int dimension, INDArray... toConcat)concatenate ndarrays along a dimensionstatic INDArrayNd4j. concat(int dimension, @NonNull INDArray... toConcat)Concatenate ndarrays along a dimensionINDArrayNDArrayFactory. concat(int dimension, INDArray... toConcat)Concatneate ndarrays along a dimensionINDArrayNDArrayFactory. convertDataEx(DataTypeEx typeSrc, INDArray source, DataTypeEx typeDst)INDArrayBaseBlasWrapper. copy(INDArray x, INDArray y)INDArrayBlasWrapper. copy(INDArray x, INDArray y)Compute y <- x (copy a matrix)static INDArrayBroadcast. copy(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast copy op.INDArrayBaseNDArrayFactory. create(double[] data)Creates a row vector with the dataINDArrayBaseNDArrayFactory. create(double[] data, char order)INDArrayBaseNDArrayFactory. create(double[] data, int[] shape)Create an ndrray with the specified shapeINDArrayBaseNDArrayFactory. create(double[] data, int[] shape, int[] stride, char order, long offset)abstract INDArrayBaseNDArrayFactory. create(double[] data, int[] shape, int[] stride, long offset)Creates an ndarray with the specified shapeINDArrayBaseNDArrayFactory. create(double[] data, long[] shape)INDArrayBaseNDArrayFactory. create(double[] data, long rows, long columns, int[] stride, long offset)Creates an ndarray with the specified shapeINDArrayBaseNDArrayFactory. create(float[] data)Creates a row vector with the dataINDArrayBaseNDArrayFactory. create(float[] data, char order)INDArrayBaseNDArrayFactory. create(float[] data, int[] shape)Create an ndrray with the specified shapeINDArrayBaseNDArrayFactory. create(float[] data, int[] shape, char ordering)INDArrayBaseNDArrayFactory. create(float[] data, int[] shape, int[] stride, char order, long offset)abstract INDArrayBaseNDArrayFactory. create(float[] data, int[] shape, int[] stride, long offset)Creates an ndarray with the specified shapeINDArrayBaseNDArrayFactory. create(float[] data, int[] shape, long offset)INDArrayBaseNDArrayFactory. create(float[] data, long[] shape)abstract INDArrayBaseNDArrayFactory. create(float[] data, long[] shape, long[] stride, char order, DataType dataType, MemoryWorkspace workspace)INDArrayBaseNDArrayFactory. create(float[] data, long rows, long columns, int[] stride, long offset)Creates an ndarray with the specified shapeINDArrayBaseNDArrayFactory. create(int[] shape)Creates an ndarray with the specified shapeINDArrayBaseNDArrayFactory. create(int[] shape, int[] stride)Creates an ndarray with the specified shapeINDArrayBaseNDArrayFactory. create(int[] data, int[] shape, int[] stride, char order, long offset)INDArrayBaseNDArrayFactory. create(int[] ints, int[] ints1, int[] stride, long offset)INDArrayBaseNDArrayFactory. create(int[] shape, int[] stride, long offset)Creates an ndarray with the specified shapeINDArrayBaseNDArrayFactory. create(int[] shape, int[] stride, long offset, char ordering)INDArrayBaseNDArrayFactory. create(int[] shape, DataType dataType, MemoryWorkspace workspace)INDArrayBaseNDArrayFactory. create(long columns)Creates a row vector with the specified number of columnsINDArrayBaseNDArrayFactory. create(long[] shape)Creates an ndarray with the specified shapeINDArrayBaseNDArrayFactory. create(long[] shape, long[] stride)INDArrayBaseNDArrayFactory. create(long[] shape, long[] stride, long offset)INDArrayBaseNDArrayFactory. create(long[] shape, long[] stride, long offset, char ordering)INDArrayBaseNDArrayFactory. create(long rows, long columns)Creates an ndarray with the specified shapeINDArrayBaseNDArrayFactory. create(long rows, long columns, char ordering)INDArrayBaseNDArrayFactory. create(long rows, long columns, int[] stride)Creates an ndarray with the specified shapeINDArrayBaseNDArrayFactory. create(long rows, long columns, int[] stride, long offset)Creates an ndarray with the specified shapeabstract INDArrayBaseNDArrayFactory. create(List<INDArray> list, int[] shape)Creates an ndarray with the specified shapeINDArrayBaseNDArrayFactory. create(DataBuffer buffer, int[] shape, int[] stride, char order, long offset)static INDArrayNd4j. create(@lombok.NonNull int[] shape, char ordering)Creates an ndarray with the specified shapestatic INDArrayNd4j. create(@lombok.NonNull long[] shape, char ordering)Create an array with given shape and ordering.static INDArrayNd4j. create(boolean[] data)Create a vector based on a java boolean array.static INDArrayNd4j. create(boolean[][] data)Create 2D boolean array based on java 2d boolean array.static INDArrayNd4j. create(boolean[][] data, @lombok.NonNull long... shape)Create a boolean array with given shape based on java 2d boolean array.static INDArrayNd4j. create(boolean[] data, long[] shape, long[] strides, char order, DataType type)static INDArrayNd4j. create(boolean[] data, long[] shape, DataType type)static INDArrayNd4j. create(byte[] data, long[] shape, long[] strides, char order, DataType type)static INDArrayNd4j. create(byte[] data, long[] shape, DataType type)static INDArrayNd4j. create(double[] data)Create double array based on java double array.static INDArrayNd4j. create(double[][] data)Create 2D double array based on java 2d double array.static INDArrayNd4j. create(double[][][] data)Create a 3D double array based on the 3D java double array.static INDArrayNd4j. create(double[][][][] data)Create 4D double array based on 4D java double array.static INDArrayNd4j. create(double[][] data, char ordering)Create a 2D double array based on a 2D java double array with given ordering.static INDArrayNd4j. create(double[] data, char order)Creates a row vector with the datastatic INDArrayNd4j. create(double[] data, int[] shape)Create an array of the specified shape initialized with values from a java 1d array.static INDArrayNd4j. create(double[] data, int[] shape, char ordering)Create an array withgiven shape and ordering based on a java double array.static INDArrayNd4j. create(double[] data, int[] shape, long offset, char ordering)Create an array.static INDArrayNd4j. create(double[] data, long... shape)static INDArrayNd4j. create(double[] data, long[] shape, char ordering)static INDArrayNd4j. create(double[] data, long[] shape, long[] strides, char order, DataType type)static INDArrayNd4j. create(double[] data, long[] shape, long offset, char ordering)static INDArrayNd4j. create(double[] data, long[] shape, DataType type)static INDArrayNd4j. create(float[] data)Creates a row vector with the datastatic INDArrayNd4j. create(float[][] data)Create 2D float array based on java 2d float array.static INDArrayNd4j. create(float[][][] data)Create a 3D float array based on the 3D java float array.static INDArrayNd4j. create(float[][][][] data)Create 4D float array based on 4D java float array.static INDArrayNd4j. create(float[][] data, char ordering)Create 2D float array based on java 2d float array and ordering.static INDArrayNd4j. create(float[] data, char order)Creates a row vector with the datastatic INDArrayNd4j. create(float[] data, int[] shape)Create an ndrray with the specified shapestatic INDArrayNd4j. create(float[] data, int[] shape, char ordering)static INDArrayNd4j. create(float[] data, int[] shape, int[] stride, long offset)Create an array of the specified type, shape and stride initialized with values from a java 1d array using offset.static INDArrayNd4j. create(float[] data, long... shape)static INDArrayNd4j. create(float[] data, long[] shape, char ordering)static INDArrayNd4j. create(float[] data, long[] shape, long[] strides, char order, DataType type)static INDArrayNd4j. create(float[] data, long[] shape, DataType type)static INDArrayNd4j. create(int columns)Creates a row vector with the specified number of columnsstatic INDArrayNd4j. create(int... shape)Creates an ndarray with the specified shapestatic INDArrayNd4j. create(int[][] data)Create 2D double array based on java 2d double array.static INDArrayNd4j. create(int[][][] data)create 3D int array based on 3D java int array.static INDArrayNd4j. create(int[][][][] data)Create 4D int array based on 4D java int array.static INDArrayNd4j. create(int[] sliceShape, double[]... arrays)static INDArrayNd4j. create(int[] sliceShape, float[]... arrays)Create an ndarray based on the given datastatic INDArrayNd4j. create(int[] shape, int[] stride)Creates an ndarray with the specified shapestatic INDArrayNd4j. create(int[] shape, int[] stride, char ordering)Creates an ndarray with the specified shapestatic INDArrayNd4j. create(int[] shape, int[] stride, long offset)Creates an ndarray with the specified shapestatic INDArrayNd4j. create(int[] data, long[] shape, long[] strides, char order, DataType type)Create an array of the specified type, shape and stride initialized with values from a java 1d array.static INDArrayNd4j. create(int[] data, long[] shape, DataType type)Create an array of the specified type and shape initialized with values from a java 1d array.static INDArrayNd4j. create(int[] shape, DataType dataType)Create an array of given shape and data type.static INDArrayNd4j. create(int columns, char order)Creates a row vector with the specified number of columnsstatic INDArrayNd4j. create(int rows, int columns, int[] stride)Creates an ndarray with the specified shapestatic INDArrayNd4j. create(int rows, int columns, int[] stride, char ordering)Create a 2D array with given rows, columns, stride and ordering.static INDArrayNd4j. create(int rows, int columns, int[] stride, long offset)Creates an ndarray with the specified shapestatic INDArrayNd4j. create(long... shape)Creates an ndarray with the specified shapestatic INDArrayNd4j. create(long[][] data)Create 2D long array based on java 2d long array.static INDArrayNd4j. create(long[] shape, long[] stride)static INDArrayNd4j. create(long[] shape, long[] stride, char ordering)static INDArrayNd4j. create(long[] data, long[] shape, long[] strides, char order, DataType type)static INDArrayNd4j. create(long[] shape, long[] stride, long offset, char ordering)Creates an ndarray with the specified shapestatic INDArrayNd4j. create(long[] data, long[] shape, DataType type)static INDArrayNd4j. create(long rows, long columns, char ordering)Creates an ndarray with the specified shapestatic INDArrayNd4j. create(short[] data, long[] shape, long[] strides, char order, DataType type)static INDArrayNd4j. create(short[] data, long[] shape, DataType type)static INDArrayNd4j. create(@NonNull String... strings)static INDArrayNd4j. create(@NonNull Collection<String> strings, long... shape)static INDArrayNd4j. create(@NonNull Collection<String> strings, long[] shape, char order)static INDArrayNd4j. create(@NonNull DataType dataType, @lombok.NonNull long[] shape, char ordering)Create an array with given data type shape and ordering.static INDArrayNd4j. create(List<? extends Number> list)Creates a row vector with the datastatic INDArrayNd4j. create(List<INDArray> list, int... shape)Creates an array with the specified shape from a list of arrays.static INDArrayNd4j. create(List<INDArray> list, long... shape)static INDArrayNd4j. create(DataBuffer buffer)Create an array based on the data buffer.static INDArrayNd4j. create(DataBuffer data, int... shape)Create an array based on the data buffer with given shape.static INDArrayNd4j. create(DataBuffer data, int[] shape, int[] strides, long offset)Create an array based on the data buffer with given shape, stride and offset.static INDArrayNd4j. create(DataBuffer data, int[] newShape, int[] newStride, long offset, char ordering)static INDArrayNd4j. create(DataBuffer data, int[] shape, long offset)static INDArrayNd4j. create(DataBuffer data, long... shape)static INDArrayNd4j. create(DataBuffer data, long[] shape, long[] strides, long offset)static INDArrayNd4j. create(DataBuffer data, long[] newShape, long[] newStride, long offset, char ordering)static INDArrayNd4j. create(DataBuffer data, long[] newShape, long[] newStride, long offset, char ordering, DataType dataType)Create an array based on the data buffer with given shape, stride, offset and data type.static INDArrayNd4j. create(DataBuffer data, long[] newShape, long[] newStride, long offset, long ews, char ordering)Create an array based on the data buffer with given shape, stride and offset.static INDArrayNd4j. create(DataType dataType, @lombok.NonNull long[] shape, long[] strides, char ordering)Create an array with given shape, stride and ordering.static INDArrayNd4j. create(DataType type, long... shape)Create an array with specified shape and datatype.static INDArrayNd4j. create(LongShapeDescriptor descriptor)SeeNd4j.create(LongShapeDescriptor, boolean)with initialize set to true.static INDArrayNd4j. create(LongShapeDescriptor descriptor, boolean initialize)Create an ndarray based on the given description,INDArrayNDArrayFactory. create(boolean[] data, long[] shape, long[] stride, char order, DataType dataType, MemoryWorkspace workspace)INDArrayNDArrayFactory. create(boolean[] data, long[] shape, long[] stride, DataType dataType, MemoryWorkspace workspace)INDArrayNDArrayFactory. create(byte[] data, long[] shape, long[] stride, char order, DataType dataType, MemoryWorkspace workspace)INDArrayNDArrayFactory. create(byte[] data, long[] shape, long[] stride, DataType dataType, MemoryWorkspace workspace)INDArrayNDArrayFactory. create(double[] data)Creates a row vector with the dataINDArrayNDArrayFactory. create(double[][] data)Create an ndarray with the given data layoutINDArrayNDArrayFactory. create(double[][] data, char ordering)Create a matrix from the given data and orderingINDArrayNDArrayFactory. create(double[] data, char order)INDArrayNDArrayFactory. create(double[] data, int[] shape)Create an ndrray with the specified shapeINDArrayNDArrayFactory. create(double[] data, int[] shape, char ordering)INDArrayNDArrayFactory. create(double[] data, int[] shape, int[] stride, char order, long offset)INDArrayNDArrayFactory. create(double[] data, int[] shape, int[] stride, long offset)Creates an ndarray with the specified shapeINDArrayNDArrayFactory. create(double[] data, int[] shape, int[] stride, long offset, char ordering)INDArrayNDArrayFactory. create(double[] data, int[] shape, long offset)INDArrayNDArrayFactory. create(double[] data, long[] shape)INDArrayNDArrayFactory. create(double[] data, long[] shape, char ordering)INDArrayNDArrayFactory. create(double[] data, long[] shape, long[] stride, char order, DataType dataType, MemoryWorkspace workspace)INDArrayNDArrayFactory. create(double[] data, long[] shape, long[] stride, long offset)INDArrayNDArrayFactory. create(double[] data, long[] shape, long[] stride, long offset, char ordering)INDArrayNDArrayFactory. create(double[] data, long[] shape, long[] stride, DataType dataType, MemoryWorkspace workspace)INDArrayNDArrayFactory. create(double[] data, long[] shape, long offset, Character order)INDArrayNDArrayFactory. create(double[] data, long rows, long columns, int[] stride, long offset)Creates an ndarray with the specified shapeINDArrayNDArrayFactory. create(float[] data)Creates a row vector with the dataINDArrayNDArrayFactory. create(float[][] floats)INDArrayNDArrayFactory. create(float[][] data, char ordering)INDArrayNDArrayFactory. create(float[] data, char order)INDArrayNDArrayFactory. create(float[] data, int[] shape)Create an ndrray with the specified shapeINDArrayNDArrayFactory. create(float[] data, int[] shape, char ordering)INDArrayNDArrayFactory. create(float[] data, int[] shape, int[] stride, char order, long offset)INDArrayNDArrayFactory. create(float[] data, int[] shape, int[] stride, long offset)Creates an ndarray with the specified shapeINDArrayNDArrayFactory. create(float[] data, int[] shape, int[] stride, long offset, char ordering)INDArrayNDArrayFactory. create(float[] data, int[] shape, long offset)INDArrayNDArrayFactory. create(float[] data, int[] shape, long offset, Character order)INDArrayNDArrayFactory. create(float[] data, long[] shape)INDArrayNDArrayFactory. create(float[] data, long[] shape, char ordering)INDArrayNDArrayFactory. create(float[] data, long[] shape, long[] stride, char order, long offset)INDArrayNDArrayFactory. create(float[] data, long[] shape, long[] stride, char order, DataType dataType)INDArrayNDArrayFactory. create(float[] data, long[] shape, long[] stride, char order, DataType dataType, MemoryWorkspace workspace)INDArrayNDArrayFactory. create(float[] data, long[] shape, long[] stride, long offset)INDArrayNDArrayFactory. create(float[] data, long[] shape, long[] stride, long offset, char ordering)INDArrayNDArrayFactory. create(float[] data, long[] shape, long[] stride, DataType dataType, MemoryWorkspace workspace)INDArrayNDArrayFactory. create(float[] data, long[] shape, long offset, Character order)INDArrayNDArrayFactory. create(float[] data, long rows, long columns, int[] stride, long offset)INDArrayNDArrayFactory. create(float[] data, long rows, long columns, int[] stride, long offset, char ordering)INDArrayNDArrayFactory. create(int[] shape)Creates an ndarray with the specified shapeINDArrayNDArrayFactory. create(int[] shape, char ordering)INDArrayNDArrayFactory. create(int[] shape, int[] stride)Creates an ndarray with the specified shapeINDArrayNDArrayFactory. create(int[] shape, int[] ints1, int[] stride, char order, long offset)INDArrayNDArrayFactory. create(int[] ints, int[] ints1, int[] stride, long offset)INDArrayNDArrayFactory. create(int[] shape, int[] stride, long offset)Creates an ndarray with the specified shapeINDArrayNDArrayFactory. create(int[] shape, int[] stride, long offset, char ordering)INDArrayNDArrayFactory. create(int[] data, long[] shape, long[] stride, char order, DataType dataType, MemoryWorkspace workspace)INDArrayNDArrayFactory. create(int[] data, long[] shape, long[] stride, DataType dataType, MemoryWorkspace workspace)INDArrayNDArrayFactory. create(int[] shape, DataBuffer buffer)Create an ndarray with the given shape and dataINDArrayNDArrayFactory. create(int[] shape, DataType dataType, MemoryWorkspace workspace)INDArrayNDArrayFactory. create(long columns)Creates a row vector with the specified number of columnsINDArrayNDArrayFactory. create(long[] shape)INDArrayNDArrayFactory. create(long[] shape, char ordering)INDArrayNDArrayFactory. create(long[] shape, long[] stride)INDArrayNDArrayFactory. create(long[] shape, long[] stride, long offset)INDArrayNDArrayFactory. create(long[] data, long[] shape, long[] stride, char order, DataType dataType, MemoryWorkspace workspace)INDArrayNDArrayFactory. create(long[] data, long[] shape, long[] stride, DataType dataType, MemoryWorkspace workspace)INDArrayNDArrayFactory. create(long[] shape, long[] stride, long offset, char ordering)INDArrayNDArrayFactory. create(long rows, long columns)Creates an ndarray with the specified shapeINDArrayNDArrayFactory. create(long rows, long columns, char ordering)INDArrayNDArrayFactory. create(long rows, long columns, int[] stride)Creates an ndarray with the specified shapeINDArrayNDArrayFactory. create(long rows, long columns, int[] stride, long offset)Creates an ndarray with the specified shapeINDArrayNDArrayFactory. create(long rows, long columns, long[] stride, long offset)INDArrayNDArrayFactory. create(short[] data, long[] shape, long[] stride, char order, DataType dataType, MemoryWorkspace workspace)INDArrayNDArrayFactory. create(short[] data, long[] shape, long[] stride, DataType dataType, MemoryWorkspace workspace)INDArrayNDArrayFactory. create(Collection<String> strings, long[] shape, char order)INDArrayNDArrayFactory. create(List<INDArray> list, int[] shape)Creates an ndarray with the specified shapeINDArrayNDArrayFactory. create(List<INDArray> list, int[] shape, char ordering)INDArrayNDArrayFactory. create(List<INDArray> list, long[] shape)INDArrayNDArrayFactory. create(List<INDArray> list, long[] shape, char ordering)INDArrayNDArrayFactory. create(DataBuffer data)Creates a row vector with the dataINDArrayNDArrayFactory. create(DataBuffer data, int[] shape)Create an ndrray with the specified shapeINDArrayNDArrayFactory. create(DataBuffer buffer, int[] shape, int[] stride, char order, long offset)INDArrayNDArrayFactory. create(DataBuffer data, int[] shape, int[] stride, long offset)Creates an ndarray with the specified shapeINDArrayNDArrayFactory. create(DataBuffer data, int[] newShape, int[] newStride, long offset, char ordering)INDArrayNDArrayFactory. create(DataBuffer buffer, int[] shape, long offset)INDArrayNDArrayFactory. create(DataBuffer data, long[] shape)INDArrayNDArrayFactory. create(DataBuffer data, long[] shape, long[] stride, long offset)INDArrayNDArrayFactory. create(DataBuffer data, long[] newShape, long[] newStride, long offset, char ordering)INDArrayNDArrayFactory. create(DataBuffer data, long[] newShape, long[] newStride, long offset, char ordering, DataType dataType)INDArrayNDArrayFactory. create(DataBuffer data, long[] newShape, long[] newStride, long offset, long ews, char ordering)INDArrayNDArrayFactory. create(DataBuffer data, long rows, long columns, int[] stride, long offset)Creates an ndarray with the specified shapeINDArrayNDArrayFactory. create(DataType dataType, long[] shape, char ordering, MemoryWorkspace workspace)INDArrayNDArrayFactory. create(DataType dataType, long[] shape, long[] strides, char ordering, MemoryWorkspace workspace)INDArrayNDArrayFactory. create(DataType dataType, long[] shape, long[] paddings, long[] paddingOffsets, char ordering, MemoryWorkspace workspace)Create an ndArray with padded Bufferstatic INDArrayNd4j. createArrayFromShapeBuffer(DataBuffer data, Pair<DataBuffer,long[]> shapeInfo)Create array based in data buffer and shape info,static INDArrayNd4j. createArrayFromShapeBuffer(DataBuffer data, DataBuffer shapeInfo)Create array based in data buffer and shape info,static INDArrayNd4j. createFromArray(boolean... array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(boolean[][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(boolean[][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(boolean[][][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(byte... array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(byte[][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(byte[][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(byte[][][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(double... array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(double[][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(double[][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(double[][][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(float... array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(float[][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(float[][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(float[][][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(int... array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(int[][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(int[][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(int[][][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(long... array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(long[][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(long[][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(long[][][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(short... array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(short[][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(short[][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(short[][][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Boolean[] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Boolean[][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Boolean[][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Boolean[][][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Byte[] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Byte[][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Byte[][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Byte[][][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Double[] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Double[][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Double[][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Double[][][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Float[] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Float[][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Float[][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Float[][][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Integer[] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Integer[][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Integer[][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Integer[][][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Long[] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Long[][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Long[][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Long[][][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Short[] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Short[][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Short[][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromArray(Short[][][][] array)This method creates INDArray from provided jvm arraystatic INDArrayNd4j. createFromFlatArray(FlatArray array)static INDArrayNd4j. createFromNpyFile(@NonNull File file)Create an INDArray from a given Numpy .npy file.INDArrayNDArrayFactory. createFromNpyFile(File file)Create from a given numpy file.INDArrayNDArrayFactory. createFromNpyHeaderPointer(org.bytedeco.javacpp.Pointer pointer)Create from an in memory numpy header.static INDArrayNd4j. createFromNpyPointer(org.bytedeco.javacpp.Pointer pointer)Create from an in memory numpy pointerINDArrayNDArrayFactory. createFromNpyPointer(org.bytedeco.javacpp.Pointer pointer)Create from an in memory numpy pointerstatic INDArrayNd4j. createNpyFromByteArray(@lombok.NonNull byte[] input)Create anINDArrayfrom the given numpy input.
The numpy input follows the format: https://docs.scipy.org/doc/numpy-1.14.0/neps/npy-format.htmlstatic INDArrayNd4j. createNpyFromInputStream(@NonNull InputStream is)Create a numpy array based on the passed in input streamstatic INDArrayNd4j. createUninitialized(int... shape)static INDArrayNd4j. createUninitialized(int[] shape, char ordering)Creates an *uninitialized* array with the specified shape and ordering.
NOTE: The underlying memory (DataBuffer) will not be initialized.static INDArrayNd4j. createUninitialized(long length)This method creates an *uninitialized* ndarray of specified length and default ordering.static INDArrayNd4j. createUninitialized(long... shape)Creates an *uninitialized* ndarray with the specified shape and default ordering.
NOTE: The underlying memory (DataBuffer) will not be initialized.static INDArrayNd4j. createUninitialized(long[] shape, char ordering)Creates an *uninitialized* array with the specified shape and ordering.static INDArrayNd4j. createUninitialized(DataType type, long... shape)static INDArrayNd4j. createUninitialized(DataType type, long[] shape, char ordering)Creates an *uninitialized* array with the specified data type, shape and ordering.INDArrayNDArrayFactory. createUninitialized(int[] shape, char ordering)INDArrayNDArrayFactory. createUninitialized(long[] shape, char ordering)INDArrayNDArrayFactory. createUninitialized(DataType dataType, long[] shape, char ordering, MemoryWorkspace workspace)static INDArrayNd4j. createUninitializedDetached(DataType dataType, char ordering, long... shape)Create an uninitialized ndArray.static INDArrayNd4j. createUninitializedDetached(DataType dataType, long... shape)SeeNd4j.createUninitializedDetached(DataType, char, long...)with default ordering.INDArrayNDArrayFactory. createUninitializedDetached(DataType dataType, char ordering, long... shape)Create an uninitialized ndArray.static INDArrayNd4j. cumsum(INDArray compute)Seecumsum(int)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. cumsum(INDArray compute, int dimension)Seecumsum(int)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. diag(INDArray x)Creates a new matrix where the values of the given vector are the diagonal values of the matrix if a vector is passed in, if a matrix is returns the kth diagonal in the matrixstatic INDArrayBroadcast. div(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast divide op.static INDArrayNd4j. empty()This method creates "empty" INDArray with datatype determined byNd4j.dataType()static INDArrayNd4j. empty(DataType type)This method creates "empty" INDArray of the specified datatypeINDArrayNDArrayFactory. empty(DataType type)static INDArrayBroadcast. eq(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast equal to op.static INDArray[]Nd4j. exec(CustomOp op)Execute the operation and return the resultstatic INDArray[]Nd4j. exec(CustomOp op, OpContext context)Execute the operation and return the resultstatic INDArrayNd4j. exec(Op op)Execute the operation and return the resultstatic INDArrayNd4j. exec(Op op, OpContext context)static INDArrayNd4j. expandDims(INDArray input, int dimension)Expand the array dimensions.INDArrayBaseNDArrayFactory. eye(long n)Create the identity ndarraystatic INDArrayNd4j. eye(long n)Create the identity ndarrayINDArrayNDArrayFactory. eye(long n)Create the identity ndarraystatic INDArrayNd4j. fromByteArray(@lombok.NonNull byte[] arr)Read an ndarray from a byte arraystatic INDArrayNd4j. gemm(INDArray a, INDArray b, boolean transposeA, boolean transposeB)matrix multiply: implements op(a)*op(b) where op(x) means transpose x (or not) depending on setting of arguments transposea and transposeb.
so gemm(a,b,false,false) == a.mmul(b), gemm(a,b,true,false) == a.transpose().mmul(b) etc.static INDArrayNd4j. gemm(INDArray a, INDArray b, INDArray c, boolean transposeA, boolean transposeB, double alpha, double beta)Matrix multiply: Implements c = alpha*op(a)*op(b) + beta*c where op(X) means transpose X (or not) depending on setting of arguments transposeA and transposeB.
Note that matrix c MUST be fortran order, have zero offset and have c.data().length == c.length().INDArrayBaseBlasWrapper. gemv(double alpha, INDArray a, INDArray x, double beta, INDArray y)INDArrayBaseBlasWrapper. gemv(float alpha, INDArray a, INDArray x, float beta, INDArray y)INDArrayBaseBlasWrapper. gemv(Number alpha, INDArray a, INDArray x, double beta, INDArray y)INDArrayBlasWrapper. gemv(double alpha, INDArray a, INDArray x, double beta, INDArray y)Deprecated.INDArrayBlasWrapper. gemv(float alpha, INDArray a, INDArray x, float beta, INDArray y)Deprecated.INDArrayBlasWrapper. gemv(Number alpha, INDArray a, INDArray x, double beta, INDArray y)************************************************************************ BLAS Level 2INDArrayBaseBlasWrapper. ger(double alpha, INDArray x, INDArray y, INDArray a)INDArrayBaseBlasWrapper. ger(float alpha, INDArray x, INDArray y, INDArray a)INDArrayBaseBlasWrapper. ger(Number alpha, INDArray x, INDArray y, INDArray a)INDArrayBlasWrapper. ger(double alpha, INDArray x, INDArray y, INDArray a)Deprecated.INDArrayBlasWrapper. ger(float alpha, INDArray x, INDArray y, INDArray a)Compute A <- alpha * x * y^T + A (general rank-1 update)INDArrayBlasWrapper. ger(Number alpha, INDArray x, INDArray y, INDArray a)INDArrayBaseBlasWrapper. gesv(INDArray a, int[] ipiv, INDArray b)INDArrayBlasWrapper. gesv(INDArray a, int[] ipiv, INDArray b)************************************************************************ LAPACKstatic INDArrayBroadcast. gt(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast greater than op.static INDArrayBroadcast. gte(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast greater than or equal to op.INDArrayBaseNDArrayFactory. hstack(@NonNull INDArray... arrs)Concatenates two matrices horizontally.static INDArrayNd4j. hstack(@NonNull INDArray... arrs)Concatenates two matrices horizontally.static INDArrayNd4j. hstack(Collection<INDArray> arrs)Concatenates two matrices horizontally.INDArrayNDArrayFactory. hstack(INDArray... arrs)Concatenates two matrices horizontally.static INDArrayNd4j. linspace(double lower, double upper, long num, @NonNull DataType dataType)Generate a linearly spaced 1d vector of the specified datatypestatic INDArrayNd4j. linspace(long lower, long upper, long num)Generate a linearly spaced vector with default data typestatic INDArrayNd4j. linspace(long lower, long upper, long num, @NonNull DataType dtype)Generate a linearly spaced vectorstatic INDArrayNd4j. linspace(@NonNull DataType dataType, double lower, double step, long num)Generate a linearly spaced 1d vector of the specified datatypestatic INDArrayNd4j. linspace(@NonNull DataType dtype, long lower, long num, long step)Generate a linearly spaced vectorstatic INDArrayBroadcast. lt(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast less than op.static INDArrayBroadcast. lte(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast less than or equal to op.static INDArrayNd4j. matmul(INDArray a, INDArray b)Matrix multiplication/dot product SeeNd4j.matmul(INDArray, INDArray, INDArray, boolean, boolean, boolean)static INDArrayNd4j. matmul(INDArray a, INDArray b, boolean transposeA, boolean transposeB, boolean transposeResult)Matrix multiplication/dot product.
SeeNd4j.matmul(INDArray, INDArray, INDArray, boolean, boolean, boolean)static INDArrayNd4j. matmul(INDArray a, INDArray b, INDArray result)Matrix multiplication/dot product.
SeeNd4j.matmul(INDArray, INDArray, INDArray, boolean, boolean, boolean)static INDArrayNd4j. matmul(INDArray a, INDArray b, INDArray result, boolean transposeA, boolean transposeB, boolean transposeResult)Matrix multiplication/dot product Depending on inputs dimensionality output result might be different.static INDArrayBroadcast. max(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast max op.static INDArrayNd4j. max(INDArray compute)Seemax(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. max(INDArray compute, int dimension)Seemax(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. mean(INDArray compute)Seemean(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. mean(INDArray compute, int dimension)Seemean(int...)with Integer.MAX_VALUE for full array reduction.static INDArray[]Nd4j. meshgrid(@NonNull INDArray x, @NonNull INDArray y)Meshgrid op.static INDArrayBroadcast. min(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast min op.static INDArrayNd4j. min(INDArray compute)Seemin(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. min(INDArray compute, int dimension)Seemin(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayBroadcast. mul(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast element-wise multiply op.static INDArrayBroadcast. neq(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast not equal to op.static INDArrayNd4j. norm1(INDArray compute)Seenorm1(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. norm1(INDArray compute, int dimension)Seenorm1(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. norm2(INDArray compute)Seenorm2(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. norm2(INDArray compute, int dimension)Seenorm2(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. normmax(INDArray compute)Seenormmax(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. normmax(INDArray compute, int dimension)Seenormmax(int...)with Integer.MAX_VALUE for full array reduction.INDArrayBaseNDArrayFactory. ones(int[] shape)Create an ndarray of onesINDArrayBaseNDArrayFactory. ones(long columns)Creates a row vector with the specified number of columnsINDArrayBaseNDArrayFactory. ones(long[] shape)INDArrayBaseNDArrayFactory. ones(long rows, long columns)Creates a row vector with the specified number of columnsstatic INDArrayNd4j. ones(@lombok.NonNull int... shape)Create an ndarray of onesstatic INDArrayNd4j. ones(@lombok.NonNull long... shape)static INDArrayNd4j. ones(DataType dataType, @lombok.NonNull long... shape)Creates an array with the specified datatype and shape, with values all set to 1INDArrayNDArrayFactory. ones(int[] shape)Create an ndarray of onesINDArrayNDArrayFactory. ones(long columns)Creates a row vector with the specified number of columnsINDArrayNDArrayFactory. ones(long[] shape)INDArrayNDArrayFactory. ones(long rows, long columns)Creates a row vector with the specified number of columnsstatic INDArrayNd4j. onesLike(INDArray arr)Ones likestatic INDArrayNd4j. pad(@NonNull INDArray toPad, @lombok.NonNull int... padWidth)static INDArrayNd4j. pad(@NonNull INDArray toPad, @lombok.NonNull int[][] padWidth)static INDArrayNd4j. pad(@NonNull INDArray toPad, @lombok.NonNull int[][] padWidth, Pad.Mode padMode, double padValue)static INDArrayNd4j. pad(@NonNull INDArray toPad, @lombok.NonNull int[] padWidth, Pad.Mode padMode, double padValue)SeeNd4j.pad(INDArray, INDArray, Mode, double), uses padWidth for all dimensions.static INDArrayNd4j. pad(@NonNull INDArray toPad, @NonNull INDArray padWidth, Pad.Mode padMode, double padValue)Pad the given ndarray to the size along each dimension.static INDArrayNd4j. pad(INDArray toPad, INDArray padding)SeeNd4j.pad(INDArray, INDArray, Mode, double)with zero padding (zeros for padValue).static INDArrayNd4j. pile(@NonNull Collection<INDArray> arrays)This method stacks vertically examples with the same shape, increasing result dimensionality.static INDArrayNd4j. pile(@NonNull INDArray... arrays)This method stacks vertically examples with the same shape, increasing result dimensionality.static INDArrayNd4j. prepend(INDArray arr, int padAmount, double val, int axis)static INDArrayNd4j. prod(INDArray compute)Seeprod(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. prod(INDArray compute, int dimension)Seeprod(int...)with Integer.MAX_VALUE for full array reduction.INDArrayBaseNDArrayFactory. pullRows(INDArray source, int sourceDimension, int[] indexes)This method produces concatenated array, that consist from tensors, fetched from source array, against some dimension and specified indexesINDArrayBaseNDArrayFactory. pullRows(INDArray source, int sourceDimension, int[] indexes, char order)This method produces concatenated array, that consist from tensors, fetched from source array, against some dimension and specified indexesstatic INDArrayNd4j. pullRows(INDArray source, int sourceDimension, @lombok.NonNull int... indexes)This method produces concatenated array, that consist from tensors, fetched from source array, against some dimension and specified indexesstatic INDArrayNd4j. pullRows(INDArray source, int sourceDimension, int[] indexes, char order)This method produces concatenated array, that consist from tensors, fetched from source array, against some dimension and specified indexesstatic INDArrayNd4j. pullRows(INDArray source, INDArray destination, int sourceDimension, @lombok.NonNull int... indexes)This method produces concatenated array, that consist from tensors, fetched from source array, against some dimension and specified indexes.INDArrayNDArrayFactory. pullRows(INDArray source, int sourceDimension, int[] indexes)This method produces concatenated array, that consist from tensors, fetched from source array, against some dimension and specified indexesINDArrayNDArrayFactory. pullRows(INDArray source, int sourceDimension, int[] indexes, char order)This method produces concatenated array, that consist from tensors, fetched from source array, against some dimension and specified indexesINDArrayNDArrayFactory. pullRows(INDArray source, int sourceDimension, long[] indexes)INDArrayNDArrayFactory. pullRows(INDArray source, INDArray destination, int sourceDimension, int[] indexes)* This method produces concatenated array, that consist from tensors, fetched from source array, against some dimension and specified indexes in to the destination arrayINDArrayBaseNDArrayFactory. rand(char order, int[] shape)Create a random ndarray with the given shape and orderINDArrayBaseNDArrayFactory. rand(char order, long[] shape)INDArrayBaseNDArrayFactory. rand(char order, long rows, long columns)Create a random (uniform 0-1) NDArray with the specified shape and orderINDArrayBaseNDArrayFactory. rand(int[] shape)Create a random ndarray with the given shape using the current time as the seedINDArrayBaseNDArrayFactory. rand(int[] shape, double min, double max, Random rng)INDArrayBaseNDArrayFactory. rand(int[] shape, float min, float max, Random rng)Generates a random matrix between min and maxINDArrayBaseNDArrayFactory. rand(int[] shape, long seed)Create a random ndarray with the given shape using the given rngINDArrayBaseNDArrayFactory. rand(int[] shape, Distribution r)Create a random ndarray with the given shape using the given rngINDArrayBaseNDArrayFactory. rand(int[] shape, Random r)Create a random ndarray with the given shape using the given rngINDArrayBaseNDArrayFactory. rand(long[] shape)INDArrayBaseNDArrayFactory. rand(long[] shape, double min, double max, Random rng)INDArrayBaseNDArrayFactory. rand(long[] shape, float min, float max, Random rng)INDArrayBaseNDArrayFactory. rand(long[] shape, long seed)INDArrayBaseNDArrayFactory. rand(long[] shape, Random r)INDArrayBaseNDArrayFactory. rand(long rows, long columns)Create a random ndarray with the given shape using the current time as the seedINDArrayBaseNDArrayFactory. rand(long rows, long columns, double min, double max, Random rng)INDArrayBaseNDArrayFactory. rand(long rows, long columns, float min, float max, Random rng)Generates a random matrix between min and maxINDArrayBaseNDArrayFactory. rand(long rows, long columns, long seed)Create a random ndarray with the given shape using the given rngINDArrayBaseNDArrayFactory. rand(long rows, long columns, Random r)Create a random ndarray with the given shape using the given rngstatic INDArrayNd4j. rand(@lombok.NonNull int... shape)Create a random ndarray with values from a uniform distribution over (0, 1) with the given shapestatic INDArrayNd4j. rand(@lombok.NonNull long... shape)SeeNd4j.rand(int[])static INDArrayNd4j. rand(char order, @lombok.NonNull int... shape)Create a random ndarray with the given shape and array order Values are sampled from a uniform distribution over (0, 1)static INDArrayNd4j. rand(double min, double max, Random rng, @lombok.NonNull long... shape)Generates a random matrix between min and maxstatic INDArrayNd4j. rand(int[] shape, double min, double max, Random rng)static INDArrayNd4j. rand(int[] shape, long seed)Deprecated.static INDArrayNd4j. rand(int[] shape, @NonNull Distribution dist)Deprecated.static INDArrayNd4j. rand(int[] shape, Random rng)Deprecated.static INDArrayNd4j. rand(int rows, int columns, Random rng)Create a random ndarray with the given shape using the given rngstatic INDArrayNd4j. rand(long[] shape, double min, double max, Random rng)static INDArrayNd4j. rand(long[] shape, @NonNull Distribution dist)Deprecated.static INDArrayNd4j. rand(long seed, @lombok.NonNull long... shape)Create a random ndarray with values from a uniform distribution over (0, 1) with the given shape using given seedstatic INDArrayNd4j. rand(@NonNull DataType dataType, @lombok.NonNull int... shape)Create a random ndarray with the given shape and data type Values are sampled from a uniform distribution over (0, 1)static INDArrayNd4j. rand(@NonNull DataType dataType, @lombok.NonNull long... shape)Create a random ndarray with values from a uniform distribution over (0, 1) with the given shape and data typestatic INDArrayNd4j. rand(@NonNull DataType dataType, char order, @lombok.NonNull int... shape)Deprecated.static INDArrayNd4j. rand(@NonNull DataType dataType, char order, @lombok.NonNull long... shape)Create a random ndarray with the given shape, data type, and array order Values are sampled from a uniform distribution over (0, 1)static INDArrayNd4j. rand(@NonNull DataType dataType, int[] shape, char order)Deprecated.use {@link Nd4j#rand(DataType, char, long...))static INDArrayNd4j. rand(@NonNull Distribution dist, @lombok.NonNull long... shape)Create a random ndarray with the given shape using the given rngstatic INDArrayNd4j. rand(INDArray target)Fill the given ndarray with random numbers drawn from a uniform distributionstatic INDArrayNd4j. rand(INDArray target, double min, double max, Random rng)Fill the given ndarray with random numbers drawn from a uniform distribution using the given RandomGeneratorstatic INDArrayNd4j. rand(INDArray target, long seed)Fill the given ndarray with random numbers drawn from a uniform distributionstatic INDArrayNd4j. rand(INDArray target, @NonNull Distribution dist)Fill the given ndarray with random numbers drawn from the given distributionstatic INDArrayNd4j. rand(INDArray target, Random rng)Fill the given ndarray with random numbers drawn from a uniform distribution using the given RandomGeneratorstatic INDArrayNd4j. rand(Random rng, @lombok.NonNull long... shape)Create a random ndarray with the given shape using the given RandomGeneratorINDArrayNDArrayFactory. rand(char order, int[] shape)Create a random ndarray with the given shape, and specified output orderINDArrayNDArrayFactory. rand(char order, long[] shape)Create a random ndarray with the given shape and specified output orderINDArrayNDArrayFactory. rand(char order, long rows, long columns)Create a random (uniform 0-1) NDArray with the specified shape and orderINDArrayNDArrayFactory. rand(int[] shape)Create a random ndarray with the given shape using the current time as the seedINDArrayNDArrayFactory. rand(int[] shape, double min, double max, Random rng)INDArrayNDArrayFactory. rand(int[] shape, float min, float max, Random rng)Generates a random matrix between min and maxINDArrayNDArrayFactory. rand(int[] shape, long seed)Create a random ndarray with the given shape using the given rngINDArrayNDArrayFactory. rand(int[] shape, Distribution r)Create a random ndarray with the given shape using the given rngINDArrayNDArrayFactory. rand(int[] shape, Random r)Create a random ndarray with the given shape using the given rngINDArrayNDArrayFactory. rand(long[] shape)Create a random ndarray with the given shape using the current time as the seedINDArrayNDArrayFactory. rand(long[] shape, double min, double max, Random rng)INDArrayNDArrayFactory. rand(long[] shape, float min, float max, Random rng)INDArrayNDArrayFactory. rand(long[] shape, long seed)INDArrayNDArrayFactory. rand(long[] shape, Random r)INDArrayNDArrayFactory. rand(long rows, long columns)Create a random ndarray with the given shape using the current time as the seedINDArrayNDArrayFactory. rand(long rows, long columns, double min, double max, Random rng)INDArrayNDArrayFactory. rand(long rows, long columns, float min, float max, Random rng)Generates a random matrix between min and maxINDArrayNDArrayFactory. rand(long rows, long columns, long seed)Create a random ndarray with the given shape using the given rngINDArrayNDArrayFactory. rand(long rows, long columns, Random r)Create a random ndarray with the given shape using the given rngINDArrayBaseNDArrayFactory. randn(char order, int[] shape)Random normal using the current time stamp as the seedINDArrayBaseNDArrayFactory. randn(char order, long[] shape)INDArrayBaseNDArrayFactory. randn(char order, long rows, long columns)Generate a random normal N(0,1) with the specified order and shapeINDArrayBaseNDArrayFactory. randn(int[] shape)Random normal N(0,1) with the specified shape andINDArrayBaseNDArrayFactory. randn(int[] shape, long seed)Random normal using the specified seedINDArrayBaseNDArrayFactory. randn(int[] shape, Random r)Random normal using the given rngINDArrayBaseNDArrayFactory. randn(long[] shape)INDArrayBaseNDArrayFactory. randn(long[] shape, long seed)INDArrayBaseNDArrayFactory. randn(long[] shape, Random r)INDArrayBaseNDArrayFactory. randn(long rows, long columns)Random normal using the current time stamp as the seedINDArrayBaseNDArrayFactory. randn(long rows, long columns, long seed)Random normal using the specified seedINDArrayBaseNDArrayFactory. randn(long rows, long columns, Random r)Random normal using the given rngstatic INDArrayNd4j. randn(@lombok.NonNull int[] shape)Create a ndarray of the given shape with values from N(0,1)static INDArrayNd4j. randn(@lombok.NonNull long... shape)Create a ndarray of the given shape with values from N(0,1).static INDArrayNd4j. randn(char order, @lombok.NonNull int... shape)Random normal N(0,1) with the specified shape and array orderstatic INDArrayNd4j. randn(char order, @lombok.NonNull long... shape)Random normal N(0,1) with the specified shape and array orderstatic INDArrayNd4j. randn(double mean, double stddev, long[] shape, Random rng)static INDArrayNd4j. randn(double mean, double stddev, INDArray target, Random rng)static INDArrayNd4j. randn(int[] shape, Random r)Deprecated.static INDArrayNd4j. randn(long[] shape, Random r)Deprecated.static INDArrayNd4j. randn(long seed, @lombok.NonNull long[] shape)Random normal N(0, 1) using the specified seedstatic INDArrayNd4j. randn(long seed, int[] shape)Deprecated.static INDArrayNd4j. randn(@NonNull DataType dataType, @lombok.NonNull int[] shape)Create a ndarray of the given shape and data type with values from N(0,1)static INDArrayNd4j. randn(@NonNull DataType dataType, @lombok.NonNull long... shape)Create a ndarray of the given shape and data type with values from N(0,1)static INDArrayNd4j. randn(@NonNull DataType dataType, char order, @lombok.NonNull long... shape)Random normal N(0,1) with the specified shape and array orderstatic INDArrayNd4j. randn(INDArray target)Fill the given ndarray with random numbers drawn from a normal distributionstatic INDArrayNd4j. randn(INDArray target, long seed)Fill the given ndarray with random numbers drawn from a normal distributionstatic INDArrayNd4j. randn(INDArray target, Random rng)Fill the given ndarray with random numbers drawn from a normal distribution utilizing the given random generatorstatic INDArrayNd4j. randn(Random r, @lombok.NonNull long... shape)Random normal using the given rngINDArrayNDArrayFactory. randn(char order, int[] shape)Random normal N(0,1) with the specified shape and orderINDArrayNDArrayFactory. randn(char order, long[] shape)Random normal N(0,1) with the specified shape and orderINDArrayNDArrayFactory. randn(char order, long rows, long columns)Random normal N(0,1), with specified output orderINDArrayNDArrayFactory. randn(int[] shape)Random normal N(0,1) using the current time stamp as the seedINDArrayNDArrayFactory. randn(int[] shape, long seed)Random normal using the specified seedINDArrayNDArrayFactory. randn(int[] shape, Random r)Random normal using the given rngINDArrayNDArrayFactory. randn(long[] shape)Random normal N(0,1) using the current time stamp as the seedINDArrayNDArrayFactory. randn(long[] shape, long seed)Random normal using the specified seedINDArrayNDArrayFactory. randn(long[] shape, Random r)INDArrayNDArrayFactory. randn(long rows, long columns)Random normal (N(0,1)) using the current time stamp as the seedINDArrayNDArrayFactory. randn(long rows, long columns, long seed)Random normal using the specified seedINDArrayNDArrayFactory. randn(long rows, long columns, Random r)Random normal using the given rngstatic INDArrayNd4j. randomBernoulli(double p, @lombok.NonNull long... shape)Generate a random array according to a binomial distribution with probability p: i.e., values 0 with probability (1-p) or value 1 with probability pstatic INDArrayNd4j. randomBernoulli(double p, @NonNull INDArray target)Fill the specified array with values generated according to a binomial distribution with probability p: i.e., values 0 with probability (1-p) or value 1 with probability pstatic INDArrayNd4j. randomBinomial(int nTrials, double p, @lombok.NonNull long... shape)Generate an array with random values generated according to a binomial distribution with the specified number of trials and probabilitystatic INDArrayNd4j. randomBinomial(int nTrials, double p, INDArray target)Fill the target array with random values generated according to a binomial distribution with the specified number of trials and probabilitystatic INDArrayNd4j. randomExponential(double lambda, long... shape)Exponential distribution: P(x) = lambda * exp(-lambda * x)static INDArrayNd4j. randomExponential(double lambda, INDArray target)Exponential distribution: P(x) = lambda * exp(-lambda * x)static INDArrayBroadcast. rdiv(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast reverse division op.static INDArrayNd4j. read(DataInputStream dis)Read in an ndarray from a data input streamstatic INDArrayNd4j. read(InputStream reader)Raad an ndarray from an input stream SeeNd4j.read(DataInputStream)static INDArrayNd4j. readBinary(File read)Read a binary ndarray from the given filestatic INDArrayNd4j. readNpy(@NonNull File file)Create an INDArray from a given Numpy .npy file.static INDArrayNd4j. readNpy(@NonNull String path)Create an INDArray from a given Numpy .npy file.static INDArrayNd4j. readNumpy(@NonNull InputStream filePath, @NonNull String split)Read line via input streamsstatic INDArrayNd4j. readNumpy(@NonNull DataType dataType, @NonNull InputStream filePath, @NonNull String split, @NonNull Charset charset)Read array from input stream.static INDArrayNd4j. readNumpy(String filePath)Read line via input streamsstatic INDArrayNd4j. readNumpy(String filePath, String split)Read line via input streamsstatic INDArrayNd4j. readNumpy(DataType dataType, String filePath)Read array.
SeeNd4j.readNumpy(DataType, InputStream, String , Charset)with default split and UTF-8 encoding.static INDArrayNd4j. readNumpy(DataType dataType, String filePath, String split)Read array via input stream.static INDArrayNd4j. readTxt(String filePath)Deprecated.to be removed in 1.0static INDArrayNd4j. readTxtString(InputStream ndarray)Deprecated.To be removed in 1.0static INDArrayNd4j. repeat(INDArray n, int num)Create an n x (shape) ndarray where the ndarray is repeated num timesINDArrayBaseNDArrayFactory. reverse(INDArray reverse)Reverses the passed in matrix such that m[0] becomes m[m.length - 1] etcstatic INDArrayNd4j. reverse(INDArray reverse)Reverses the passed in matrix such that m[0] becomes m[m.length - 1] etcINDArrayNDArrayFactory. reverse(INDArray reverse)Reverses the passed in matrix such that m[0] becomes m[m.length - 1] etcstatic INDArrayNd4j. rollAxis(INDArray a, int axis)Roll the specified axis backwards, until it lies in a given position.static INDArrayNd4j. rollAxis(INDArray a, int axis, int start)Roll the specified axis backwards, until it lies in a given position.INDArrayBaseNDArrayFactory. rot(INDArray reverse)Reverses the passed in matrix such that m[0] becomes m[m.length - 1] etcINDArrayNDArrayFactory. rot(INDArray reverse)Reverses the passed in matrix such that m[0] becomes m[m.length - 1] etcstatic INDArrayBroadcast. rsub(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast reverse subtraction op.INDArrayBaseBlasWrapper. scal(double alpha, INDArray x)INDArrayBaseBlasWrapper. scal(float alpha, INDArray x)INDArrayBlasWrapper. scal(double alpha, INDArray x)Deprecated.INDArrayBlasWrapper. scal(float alpha, INDArray x)Deprecated.INDArrayBaseNDArrayFactory. scalar(double value)Create a scalar nd array with the specified value and offsetINDArrayBaseNDArrayFactory. scalar(double value, long offset)Create a scalar nd array with the specified value and offsetINDArrayBaseNDArrayFactory. scalar(float value)INDArrayBaseNDArrayFactory. scalar(float value, long offset)Create a scalar nd array with the specified value and offsetINDArrayBaseNDArrayFactory. scalar(int value, long offset)Create a scalar nd array with the specified value and offsetINDArrayBaseNDArrayFactory. scalar(Number value)Create a scalar ndarray with the specified offsetINDArrayBaseNDArrayFactory. scalar(DataType dataType)static INDArrayNd4j. scalar(boolean value)Create a scalar NDArray with the specified value and BOOLEAN datatypestatic INDArrayNd4j. scalar(double value)Create a scalar nd array with the specified valuestatic INDArrayNd4j. scalar(float value)Create a scalar NDArray with the specified value and FLOAT datatypestatic INDArrayNd4j. scalar(int value)Create a scalar NDArray with the specified value and INT datatypestatic INDArrayNd4j. scalar(long value)Create a scalar NDArray with the specified value and LONG datatypestatic INDArrayNd4j. scalar(@NonNull String string)static INDArrayNd4j. scalar(Number value)Create a scalar ndarray with the specified valuestatic INDArrayNd4j. scalar(DataType dataType, Number value)Create a scalar ndarray with the specified value and datatypeINDArrayNDArrayFactory. scalar(double value)Create a scalar nd array with the specified value and offsetINDArrayNDArrayFactory. scalar(double value, long offset)Create a scalar nd array with the specified value and offsetINDArrayNDArrayFactory. scalar(float value)Create a scalar nd array with the specified value and offsetINDArrayNDArrayFactory. scalar(float value, long offset)Create a scalar nd array with the specified value and offsetINDArrayNDArrayFactory. scalar(int value, long offset)INDArrayNDArrayFactory. scalar(Number value)Create a scalar ndarray with the specified offsetINDArrayNDArrayFactory. scalar(DataType dataType)Create a scalar nd array with the data type and a default value depending on the data type.static INDArrayNd4j. sort(INDArray ndarray, boolean ascending)Sort all elements of an array.static INDArrayNd4j. sort(INDArray ndarray, int dimension, boolean ascending)Sort an ndarray along a particular dimension
Note that the input array is modified in-place.INDArrayNDArrayFactory. sort(INDArray x, boolean descending)INDArrayNDArrayFactory. sort(INDArray x, boolean descending, int... dimensions)static INDArrayNd4j. sortColumns(INDArray in, int rowIdx, boolean ascending)Sort (shuffle) the columns of a 2d array according to the value at a specified row.INDArrayNDArrayFactory. sortCooIndices(INDArray x)static INDArrayNd4j. sortRows(INDArray in, int colIdx, boolean ascending)Sort (shuffle) the rows of a 2d array according to the value at a specified column.static INDArray[]Nd4j. sortWithIndices(INDArray ndarray, int dimension, boolean ascending)Sort an ndarray along a particular dimension.
Note that the input array is modified in-place.static INDArrayNd4j. specialConcat(int dimension, @NonNull INDArray... toConcat)Concatenate ndarrays along a dimension PLEASE NOTE: This method is special for GPU backend, it works on HOST side only.INDArrayNDArrayFactory. specialConcat(int dimension, INDArray... toConcat)Concatenate ndarrays along a dimension PLEASE NOTE: This method is special for GPU backend, it works on HOST side only.static INDArrayNd4j. squeeze(INDArray input, int dimension)Squeeze : removes a dimension of size 1static INDArrayNd4j. stack(int axis, @NonNull INDArray... values)Stack a set of N SDVariables of rank X into one rank X+1 variable.static INDArrayNd4j. std(INDArray compute)Seestd(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. std(INDArray compute, int dimension)Seestd(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. stripOnes(INDArray toStrip)Reshapes an ndarray to remove leading 1sstatic INDArrayBroadcast. sub(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast subtraction op.static INDArrayNd4j. sum(INDArray compute)Seesum(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. sum(INDArray compute, int dimension)Seesum(int...)with Integer.MAX_VALUE for full array reduction.INDArrayBaseBlasWrapper. swap(INDArray x, INDArray y)INDArrayBlasWrapper. swap(INDArray x, INDArray y)Compute x <-> y (swap two matrices)INDArrayBaseBlasWrapper. sysv(char uplo, INDArray a, int[] ipiv, INDArray b)INDArrayBlasWrapper. sysv(char uplo, INDArray a, int[] ipiv, INDArray b)static INDArray[]Nd4j. tear(INDArray tensor, @lombok.NonNull int... dimensions)This method does the opposite to pile/vstack/hstack - it returns independent TAD copies along given dimensionsINDArray[]NDArrayFactory. tear(INDArray tensor, int... dimensions)static INDArrayNd4j. tensorMmul(INDArray a, INDArray b, int[][] axes)Tensor matrix multiplication.static INDArrayNd4j. tensorMmul(INDArray a, INDArray b, INDArray result, int[][] axes)Tensor matrix multiplication.static INDArrayNd4j. tile(INDArray tile, @lombok.NonNull int... repeat)An alias for repmatINDArrayBaseNDArrayFactory. toFlattened(char order, INDArray... matrices)INDArrayBaseNDArrayFactory. toFlattened(int length, Iterator<? extends INDArray>... matrices)INDArrayBaseNDArrayFactory. toFlattened(Collection<INDArray> matrices)Returns a vector with all of the elements in every nd array equal to the sum of the lengths of the ndarraysINDArrayBaseNDArrayFactory. toFlattened(INDArray... matrices)static INDArrayNd4j. toFlattened(char order, @NonNull INDArray... matrices)Create a long row vector of all of the given ndarrays/static INDArrayNd4j. toFlattened(char order, Collection<INDArray> matrices)Create a long row vector of all of the given ndarraysstatic INDArrayNd4j. toFlattened(@NonNull INDArray... matrices)Create a long row vector of all of the given ndarraysstatic INDArrayNd4j. toFlattened(Collection<INDArray> matrices)Create a long row vector of all of the given ndarraysINDArrayNDArrayFactory. toFlattened(char order, Collection<INDArray> matrices)Returns a flattened ndarray with all elements in each ndarray regardless of dimension.INDArrayNDArrayFactory. toFlattened(char order, INDArray... matrices)Flatten all of the ndarrays in to one long vectorINDArrayNDArrayFactory. toFlattened(int length, Iterator<? extends INDArray>... matrices)Returns a flattened ndarray with all of the elements in each ndarray regardless of dimensionINDArrayNDArrayFactory. toFlattened(Collection<INDArray> matrices)/** Returns a flattened ndarray with all of the elements in each ndarray regardless of dimensionINDArrayNDArrayFactory. toFlattened(INDArray... matrices)Flatten all of the ndarrays in to one long vectorstatic INDArrayNd4j. tri(int n)SeeNd4j.tri(int,int,int)with m = n, k=0.static INDArrayNd4j. tri(int n, int k)SeeNd4j.tri(int,int,int)with m = n.static INDArrayNd4j. tri(int n, int m, int k)Like the scipy function tri.static INDArrayNd4j. triu(INDArray m, int k)Upper triangle of an array.INDArrayBaseNDArrayFactory. valueArrayOf(int[] shape, double value)Creates an ndarray with the specified value as the only value in the ndarrayINDArrayBaseNDArrayFactory. valueArrayOf(long[] shape, double value)INDArrayBaseNDArrayFactory. valueArrayOf(long rows, long columns, double value)Creates a row vector with the specified number of columnsstatic INDArrayNd4j. valueArrayOf(int[] shape, double value)Creates an ndarray with the specified value as the only value in the ndarray.static INDArrayNd4j. valueArrayOf(long[] shape, double value)static INDArrayNd4j. valueArrayOf(long[] shape, double value, DataType type)Creates an ndarray with the specified value as the only value in the ndarray.static INDArrayNd4j. valueArrayOf(long[] shape, float value)Creates an ndarray with the specified value as the only value in the FLOAT32 datatype NDArray.static INDArrayNd4j. valueArrayOf(long[] shape, int value)Creates an ndarray with the specified value as the only value in the INTEGER datatype NDArray.static INDArrayNd4j. valueArrayOf(long[] shape, long value, DataType type)static INDArrayNd4j. valueArrayOf(long num, double value)Creates a row vector ndarray with the specified value as the only value in the ndarray Some people may know this as np.fullstatic INDArrayNd4j. valueArrayOf(long rows, long columns, double value)Creates a row vector with the specified number of columns Some people may know this as np.fullINDArrayNDArrayFactory. valueArrayOf(int[] shape, double value)Creates an ndarray with the specified value as the only value in the ndarrayINDArrayNDArrayFactory. valueArrayOf(long[] shape, double value)INDArrayNDArrayFactory. valueArrayOf(long rows, long columns, double value)Creates a row vector with the specified number of columnsstatic INDArrayNd4j. var(INDArray compute)Seevar(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. var(INDArray compute, int dimension)Seevar(int...)with Integer.MAX_VALUE for full array reduction.INDArrayBaseNDArrayFactory. vstack(INDArray... arrs)Concatenates two matrices vertically.static INDArrayNd4j. vstack(@NonNull INDArray... arrs)Concatenates two matrices vertically.static INDArrayNd4j. vstack(Collection<INDArray> arrs)Concatenates two matrices vertically.INDArrayNDArrayFactory. vstack(INDArray... arrs)Concatenates two matrices vertically.static INDArray[]Nd4j. where(INDArray condition, INDArray x, INDArray y)Similar to numpy.where operation.INDArrayBaseNDArrayFactory. zeros(int[] shape)Create an ndarray of zerosINDArrayBaseNDArrayFactory. zeros(long columns)Creates a row vector with the specified number of columnsINDArrayBaseNDArrayFactory. zeros(long[] shape)INDArrayBaseNDArrayFactory. zeros(long rows, long columns)Creates a row vector with the specified number of columnsstatic INDArrayNd4j. zeros(@lombok.NonNull int... shape)Create an ndarray of zerosstatic INDArrayNd4j. zeros(@lombok.NonNull long... shape)Create an ndarray of zerosstatic INDArrayNd4j. zeros(int[] shape, char order)Create an ndarray of zerosstatic INDArrayNd4j. zeros(int[] shape, int[] stride)static INDArrayNd4j. zeros(int[] shape, int[] stride, long offset)static INDArrayNd4j. zeros(int[] shape, DataType dataType)static INDArrayNd4j. zeros(int columns, char order)Create a 1D float array in soecified order initialized with zero.static INDArrayNd4j. zeros(int rows, int columns, char ordering)Create a 2D array initialized with zeros.static INDArrayNd4j. zeros(int rows, int columns, int[] stride)See {@link @see #create(int, int, int[], char)}static INDArrayNd4j. zeros(int rows, int columns, int[] stride, long offset)static INDArrayNd4j. zeros(long[] shape, char order)static INDArrayNd4j. zeros(DataType dataType, @lombok.NonNull long... shape)Creates an array with the specified data tyoe and shape initialized with zero.INDArrayNDArrayFactory. zeros(int[] shape)Create an ndarray of zerosINDArrayNDArrayFactory. zeros(long columns)Creates a row vector with the specified number of columnsINDArrayNDArrayFactory. zeros(long[] shape)INDArrayNDArrayFactory. zeros(long rows, long columns)Creates a row vector with the specified number of columnsstatic INDArrayNd4j. zerosLike(INDArray arr)Empty likeMethods in org.nd4j.linalg.factory that return types with arguments of type INDArray Modifier and Type Method Description static Map<String,INDArray>Nd4j. createFromNpzFile(File file)Map<String,INDArray>NDArrayFactory. createFromNpzFile(File file)Create a Mapfrom given npz file. Methods in org.nd4j.linalg.factory with parameters of type INDArray Modifier and Type Method Description static INDArrayNd4j. accumulate(@NonNull INDArray... arrays)This method sums given arrays and stores them to a new arraystatic INDArrayNd4j. accumulate(INDArray target, Collection<INDArray> arrays)This method sums given arrays and stores them to a given target arraystatic INDArrayNd4j. accumulate(INDArray target, INDArray[] arrays)This method sums given arrays and stores them to a given target arrayINDArrayNDArrayFactory. accumulate(INDArray target, INDArray... arrays)This method sums given arrays to targetstatic INDArrayBroadcast. add(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast add op.static INDArrayBroadcast. amax(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast absolute max op.static INDArrayBroadcast. amin(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast absolute min op.static INDArrayNd4j. append(INDArray arr, int padAmount, double val, int axis)Append the given array with the specified value size along a particular axis.INDArrayBaseNDArrayFactory. appendBias(INDArray... vectors)Merge the vectors and append a bias.static INDArrayNd4j. appendBias(@NonNull INDArray... vectors)INDArrayNDArrayFactory. appendBias(INDArray... vectors)static INDArrayNd4j. argMax(INDArray arr, @lombok.NonNull int... dimension)Get the maximum values for a dimension.static INDArrayNd4j. argMin(INDArray arr, @lombok.NonNull int... dimension)SeeNd4j.argMax(INDArray, int...)but return minimum values.static voidDataTypeValidation. assertDouble(INDArray d)static voidDataTypeValidation. assertDouble(INDArray... d)static voidDataTypeValidation. assertFloat(INDArray d2)static voidDataTypeValidation. assertFloat(INDArray... d2)static voidDataTypeValidation. assertSameDataType(INDArray... indArrays)doubleBaseBlasWrapper. asum(INDArray x)doubleBlasWrapper. asum(INDArray x)Compute || x ||_1 (1-norm, sum of absolute values)INDArrayNDArrayFactory. average(INDArray[] arrays)This method averages input arrays, and returns averaged arrayINDArrayNDArrayFactory. average(INDArray target, Collection<INDArray> arrays)This method averages input arrays, and returns averaged arrayINDArrayNDArrayFactory. average(INDArray target, INDArray[] arrays)This method averages input arrays, and returns averaged arraystatic INDArrayNd4j. averageAndPropagate(INDArray[] arrays)This method averages input arrays, and returns averaged array.static INDArrayNd4j. averageAndPropagate(INDArray target, Collection<INDArray> arrays)This method averages input arrays, and returns averaged array.INDArrayBaseBlasWrapper. axpy(double da, INDArray dx, INDArray dy)INDArrayBaseBlasWrapper. axpy(float da, INDArray dx, INDArray dy)INDArrayBaseBlasWrapper. axpy(Number da, INDArray dx, INDArray dy)INDArrayBlasWrapper. axpy(double da, INDArray dx, INDArray dy)Deprecated.INDArrayBlasWrapper. axpy(float da, INDArray dx, INDArray dy)Deprecated.INDArrayBlasWrapper. axpy(Number da, INDArray dx, INDArray dy)Compute y <- y + x * alphaINDArrayBaseNDArrayFactory. bilinearProducts(INDArray curr, INDArray in)Returns a column vector where each entry is the nth bilinear product of the nth slices of the two tensors.INDArrayNDArrayFactory. bilinearProducts(INDArray curr, INDArray in)Returns a column vector where each entry is the nth bilinear product of the nth slices of the two tensors.static INDArrayNd4j. choice(@NonNull INDArray source, @NonNull INDArray probs, @NonNull INDArray target, Random rng)This method samples value from Source array to Target, with probabilites provided in Probs argumentstatic INDArrayNd4j. choice(INDArray source, INDArray probs, int numSamples)This method returns new INDArray instance, sampled from Source array with probabilities given in Probs using the default random number generator.static INDArrayNd4j. choice(INDArray source, INDArray probs, int numSamples, Random rng)This method returns new INDArray instance, sampled from Source array with probabilities given in Probs.static INDArrayNd4j. choice(INDArray source, INDArray probs, INDArray target)This method samples value from Source array to Target,the default random number generator.static voidNd4j. clearNans(INDArray arr)Clear nans from an ndarrayINDArrayBaseNDArrayFactory. concat(int dimension, INDArray... toConcat)concatenate ndarrays along a dimensionstatic INDArrayNd4j. concat(int dimension, @NonNull INDArray... toConcat)Concatenate ndarrays along a dimensionINDArrayNDArrayFactory. concat(int dimension, INDArray... toConcat)Concatneate ndarrays along a dimensionINDArrayNDArrayFactory. convertDataEx(DataTypeEx typeSrc, INDArray source, DataTypeEx typeDst)static org.bytedeco.javacpp.PointerNd4j. convertToNumpy(INDArray arr)Converts anINDArrayto a numpy struct.org.bytedeco.javacpp.PointerNDArrayFactory. convertToNumpy(INDArray array)Convert anINDArrayto a numpy array.INDArrayBaseBlasWrapper. copy(INDArray x, INDArray y)voidBaseNDArrayFactory. copy(INDArray a, INDArray b)Copy a to bINDArrayBlasWrapper. copy(INDArray x, INDArray y)Compute y <- x (copy a matrix)static INDArrayBroadcast. copy(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast copy op.static voidNd4j. copy(INDArray a, INDArray b)Copy a to bvoidNDArrayFactory. copy(INDArray a, INDArray b)Copy a to bstatic INDArrayNd4j. cumsum(INDArray compute)Seecumsum(int)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. cumsum(INDArray compute, int dimension)Seecumsum(int)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. diag(INDArray x)Creates a new matrix where the values of the given vector are the diagonal values of the matrix if a vector is passed in, if a matrix is returns the kth diagonal in the matrixstatic INDArrayBroadcast. div(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast divide op.doubleBaseBlasWrapper. dot(INDArray x, INDArray y)doubleBlasWrapper. dot(INDArray x, INDArray y)Compute x^T * y (dot product)static INDArrayBroadcast. eq(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast equal to op.static INDArrayNd4j. expandDims(INDArray input, int dimension)Expand the array dimensions.intBaseBlasWrapper. geev(char jobvl, char jobvr, INDArray A, INDArray WR, INDArray WI, INDArray VL, INDArray VR)intBlasWrapper. geev(char jobvl, char jobvr, INDArray A, INDArray WR, INDArray WI, INDArray VL, INDArray VR)voidBaseBlasWrapper. gelsd(INDArray A, INDArray B)voidBlasWrapper. gelsd(INDArray A, INDArray B)Generalized Least Squares via *GELSD.static INDArrayNd4j. gemm(INDArray a, INDArray b, boolean transposeA, boolean transposeB)matrix multiply: implements op(a)*op(b) where op(x) means transpose x (or not) depending on setting of arguments transposea and transposeb.
so gemm(a,b,false,false) == a.mmul(b), gemm(a,b,true,false) == a.transpose().mmul(b) etc.static INDArrayNd4j. gemm(INDArray a, INDArray b, INDArray c, boolean transposeA, boolean transposeB, double alpha, double beta)Matrix multiply: Implements c = alpha*op(a)*op(b) + beta*c where op(X) means transpose X (or not) depending on setting of arguments transposeA and transposeB.
Note that matrix c MUST be fortran order, have zero offset and have c.data().length == c.length().INDArrayBaseBlasWrapper. gemv(double alpha, INDArray a, INDArray x, double beta, INDArray y)INDArrayBaseBlasWrapper. gemv(float alpha, INDArray a, INDArray x, float beta, INDArray y)INDArrayBaseBlasWrapper. gemv(Number alpha, INDArray a, INDArray x, double beta, INDArray y)INDArrayBlasWrapper. gemv(double alpha, INDArray a, INDArray x, double beta, INDArray y)Deprecated.INDArrayBlasWrapper. gemv(float alpha, INDArray a, INDArray x, float beta, INDArray y)Deprecated.INDArrayBlasWrapper. gemv(Number alpha, INDArray a, INDArray x, double beta, INDArray y)************************************************************************ BLAS Level 2voidBaseBlasWrapper. geqrf(INDArray A, INDArray tau)voidBlasWrapper. geqrf(INDArray A, INDArray tau)INDArrayBaseBlasWrapper. ger(double alpha, INDArray x, INDArray y, INDArray a)INDArrayBaseBlasWrapper. ger(float alpha, INDArray x, INDArray y, INDArray a)INDArrayBaseBlasWrapper. ger(Number alpha, INDArray x, INDArray y, INDArray a)INDArrayBlasWrapper. ger(double alpha, INDArray x, INDArray y, INDArray a)Deprecated.INDArrayBlasWrapper. ger(float alpha, INDArray x, INDArray y, INDArray a)Compute A <- alpha * x * y^T + A (general rank-1 update)INDArrayBlasWrapper. ger(Number alpha, INDArray x, INDArray y, INDArray a)INDArrayBaseBlasWrapper. gesv(INDArray a, int[] ipiv, INDArray b)INDArrayBlasWrapper. gesv(INDArray a, int[] ipiv, INDArray b)************************************************************************ LAPACKstatic INDArrayBroadcast. gt(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast greater than op.static INDArrayBroadcast. gte(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast greater than or equal to op.INDArrayBaseNDArrayFactory. hstack(@NonNull INDArray... arrs)Concatenates two matrices horizontally.static INDArrayNd4j. hstack(@NonNull INDArray... arrs)Concatenates two matrices horizontally.INDArrayNDArrayFactory. hstack(INDArray... arrs)Concatenates two matrices horizontally.intBaseBlasWrapper. iamax(INDArray x)intBlasWrapper. iamax(INDArray x)Compute index of element with largest absolute value (index of absolute value maximum)static booleanNDValidation. isSameType(INDArray[] x)static booleanNDValidation. isSameType(INDArray x, INDArray y)static INDArrayBroadcast. lt(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast less than op.static INDArrayBroadcast. lte(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast less than or equal to op.static INDArrayNd4j. matmul(INDArray a, INDArray b)Matrix multiplication/dot product SeeNd4j.matmul(INDArray, INDArray, INDArray, boolean, boolean, boolean)static INDArrayNd4j. matmul(INDArray a, INDArray b, boolean transposeA, boolean transposeB, boolean transposeResult)Matrix multiplication/dot product.
SeeNd4j.matmul(INDArray, INDArray, INDArray, boolean, boolean, boolean)static INDArrayNd4j. matmul(INDArray a, INDArray b, INDArray result)Matrix multiplication/dot product.
SeeNd4j.matmul(INDArray, INDArray, INDArray, boolean, boolean, boolean)static INDArrayNd4j. matmul(INDArray a, INDArray b, INDArray result, boolean transposeA, boolean transposeB, boolean transposeResult)Matrix multiplication/dot product Depending on inputs dimensionality output result might be different.static INDArrayBroadcast. max(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast max op.static INDArrayNd4j. max(INDArray compute)Seemax(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. max(INDArray compute, int dimension)Seemax(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. mean(INDArray compute)Seemean(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. mean(INDArray compute, int dimension)Seemean(int...)with Integer.MAX_VALUE for full array reduction.static INDArray[]Nd4j. meshgrid(@NonNull INDArray x, @NonNull INDArray y)Meshgrid op.static INDArrayBroadcast. min(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast min op.static INDArrayNd4j. min(INDArray compute)Seemin(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. min(INDArray compute, int dimension)Seemin(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayBroadcast. mul(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast element-wise multiply op.static INDArrayBroadcast. neq(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast not equal to op.static INDArrayNd4j. norm1(INDArray compute)Seenorm1(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. norm1(INDArray compute, int dimension)Seenorm1(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. norm2(INDArray compute)Seenorm2(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. norm2(INDArray compute, int dimension)Seenorm2(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. normmax(INDArray compute)Seenormmax(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. normmax(INDArray compute, int dimension)Seenormmax(int...)with Integer.MAX_VALUE for full array reduction.doubleBaseBlasWrapper. nrm2(INDArray x)doubleBlasWrapper. nrm2(INDArray x)Compute || x ||_2 (2-norm)static INDArrayNd4j. onesLike(INDArray arr)Ones likevoidBaseBlasWrapper. ormqr(char side, char trans, INDArray A, INDArray tau, INDArray C)voidBlasWrapper. ormqr(char side, char trans, INDArray A, INDArray tau, INDArray C)static INDArrayNd4j. pad(@NonNull INDArray toPad, @lombok.NonNull int... padWidth)static INDArrayNd4j. pad(@NonNull INDArray toPad, @lombok.NonNull int[][] padWidth)static INDArrayNd4j. pad(@NonNull INDArray toPad, @lombok.NonNull int[][] padWidth, Pad.Mode padMode, double padValue)static INDArrayNd4j. pad(@NonNull INDArray toPad, @lombok.NonNull int[] padWidth, Pad.Mode padMode, double padValue)SeeNd4j.pad(INDArray, INDArray, Mode, double), uses padWidth for all dimensions.static INDArrayNd4j. pad(@NonNull INDArray toPad, @NonNull INDArray padWidth, Pad.Mode padMode, double padValue)Pad the given ndarray to the size along each dimension.static INDArrayNd4j. pad(INDArray toPad, INDArray padding)SeeNd4j.pad(INDArray, INDArray, Mode, double)with zero padding (zeros for padValue).static INDArrayNd4j. pile(@NonNull INDArray... arrays)This method stacks vertically examples with the same shape, increasing result dimensionality.voidBaseBlasWrapper. posv(char uplo, INDArray A, INDArray B)voidBlasWrapper. posv(char uplo, INDArray A, INDArray B)static INDArrayNd4j. prepend(INDArray arr, int padAmount, double val, int axis)static INDArrayNd4j. prod(INDArray compute)Seeprod(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. prod(INDArray compute, int dimension)Seeprod(int...)with Integer.MAX_VALUE for full array reduction.INDArrayBaseNDArrayFactory. pullRows(INDArray source, int sourceDimension, int[] indexes)This method produces concatenated array, that consist from tensors, fetched from source array, against some dimension and specified indexesINDArrayBaseNDArrayFactory. pullRows(INDArray source, int sourceDimension, int[] indexes, char order)This method produces concatenated array, that consist from tensors, fetched from source array, against some dimension and specified indexesstatic INDArrayNd4j. pullRows(INDArray source, int sourceDimension, @lombok.NonNull int... indexes)This method produces concatenated array, that consist from tensors, fetched from source array, against some dimension and specified indexesstatic INDArrayNd4j. pullRows(INDArray source, int sourceDimension, int[] indexes, char order)This method produces concatenated array, that consist from tensors, fetched from source array, against some dimension and specified indexesstatic INDArrayNd4j. pullRows(INDArray source, INDArray destination, int sourceDimension, @lombok.NonNull int... indexes)This method produces concatenated array, that consist from tensors, fetched from source array, against some dimension and specified indexes.INDArrayNDArrayFactory. pullRows(INDArray source, int sourceDimension, int[] indexes)This method produces concatenated array, that consist from tensors, fetched from source array, against some dimension and specified indexesINDArrayNDArrayFactory. pullRows(INDArray source, int sourceDimension, int[] indexes, char order)This method produces concatenated array, that consist from tensors, fetched from source array, against some dimension and specified indexesINDArrayNDArrayFactory. pullRows(INDArray source, int sourceDimension, long[] indexes)INDArrayNDArrayFactory. pullRows(INDArray source, INDArray destination, int sourceDimension, int[] indexes)* This method produces concatenated array, that consist from tensors, fetched from source array, against some dimension and specified indexes in to the destination arraystatic INDArrayNd4j. rand(INDArray target)Fill the given ndarray with random numbers drawn from a uniform distributionstatic INDArrayNd4j. rand(INDArray target, double min, double max, Random rng)Fill the given ndarray with random numbers drawn from a uniform distribution using the given RandomGeneratorstatic INDArrayNd4j. rand(INDArray target, long seed)Fill the given ndarray with random numbers drawn from a uniform distributionstatic INDArrayNd4j. rand(INDArray target, @NonNull Distribution dist)Fill the given ndarray with random numbers drawn from the given distributionstatic INDArrayNd4j. rand(INDArray target, Random rng)Fill the given ndarray with random numbers drawn from a uniform distribution using the given RandomGeneratorstatic INDArrayNd4j. randn(double mean, double stddev, INDArray target, Random rng)static INDArrayNd4j. randn(INDArray target)Fill the given ndarray with random numbers drawn from a normal distributionstatic INDArrayNd4j. randn(INDArray target, long seed)Fill the given ndarray with random numbers drawn from a normal distributionstatic INDArrayNd4j. randn(INDArray target, Random rng)Fill the given ndarray with random numbers drawn from a normal distribution utilizing the given random generatorstatic INDArrayNd4j. randomBernoulli(double p, @NonNull INDArray target)Fill the specified array with values generated according to a binomial distribution with probability p: i.e., values 0 with probability (1-p) or value 1 with probability pstatic INDArrayNd4j. randomBinomial(int nTrials, double p, INDArray target)Fill the target array with random values generated according to a binomial distribution with the specified number of trials and probabilitystatic INDArrayNd4j. randomExponential(double lambda, INDArray target)Exponential distribution: P(x) = lambda * exp(-lambda * x)static INDArrayBroadcast. rdiv(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast reverse division op.static INDArrayNd4j. repeat(INDArray n, int num)Create an n x (shape) ndarray where the ndarray is repeated num timesINDArrayBaseNDArrayFactory. reverse(INDArray reverse)Reverses the passed in matrix such that m[0] becomes m[m.length - 1] etcstatic INDArrayNd4j. reverse(INDArray reverse)Reverses the passed in matrix such that m[0] becomes m[m.length - 1] etcINDArrayNDArrayFactory. reverse(INDArray reverse)Reverses the passed in matrix such that m[0] becomes m[m.length - 1] etcstatic INDArrayNd4j. rollAxis(INDArray a, int axis)Roll the specified axis backwards, until it lies in a given position.static INDArrayNd4j. rollAxis(INDArray a, int axis, int start)Roll the specified axis backwards, until it lies in a given position.INDArrayBaseNDArrayFactory. rot(INDArray reverse)Reverses the passed in matrix such that m[0] becomes m[m.length - 1] etcINDArrayNDArrayFactory. rot(INDArray reverse)Reverses the passed in matrix such that m[0] becomes m[m.length - 1] etcvoidBaseNDArrayFactory. rot90(INDArray toRotate)Rotate a matrix 90 degreesstatic voidNd4j. rot90(INDArray toRotate)Rotate a matrix 90 degreesvoidNDArrayFactory. rot90(INDArray toRotate)Rotate a matrix 90 degreesstatic INDArrayBroadcast. rsub(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast reverse subtraction op.static voidNd4j. saveBinary(INDArray arr, File saveTo)Save an ndarray to the given filevoidBaseBlasWrapper. saxpy(double alpha, INDArray x, INDArray y)voidBaseBlasWrapper. saxpy(float alpha, INDArray x, INDArray y)voidBlasWrapper. saxpy(double alpha, INDArray x, INDArray y)Deprecated.voidBlasWrapper. saxpy(float alpha, INDArray x, INDArray y)Deprecated.INDArrayBaseBlasWrapper. scal(double alpha, INDArray x)INDArrayBaseBlasWrapper. scal(float alpha, INDArray x)INDArrayBlasWrapper. scal(double alpha, INDArray x)Deprecated.INDArrayBlasWrapper. scal(float alpha, INDArray x)Deprecated.static voidNd4j. scatterUpdate(ScatterUpdate.UpdateOp op, @NonNull INDArray array, @NonNull INDArray indices, @NonNull INDArray updates, int... axis)Deprecated.static long[]Nd4j. shape(INDArray arr)Returns the shape of the ndarraystatic voidNd4j. shuffle(INDArray toShuffle, @lombok.NonNull int... dimension)In place shuffle of an ndarray along a specified set of dimensionsstatic voidNd4j. shuffle(INDArray toShuffle, Random random, @lombok.NonNull int... dimension)In place shuffle of an ndarray along a specified set of dimensionsvoidNDArrayFactory. shuffle(INDArray array, Random rnd, int... dimension)In place shuffle of an ndarray along a specified set of dimensionsstatic INDArrayNd4j. sort(INDArray ndarray, boolean ascending)Sort all elements of an array.static INDArrayNd4j. sort(INDArray ndarray, int dimension, boolean ascending)Sort an ndarray along a particular dimension
Note that the input array is modified in-place.INDArrayNDArrayFactory. sort(INDArray x, boolean descending)INDArrayNDArrayFactory. sort(INDArray x, boolean descending, int... dimensions)static INDArrayNd4j. sortColumns(INDArray in, int rowIdx, boolean ascending)Sort (shuffle) the columns of a 2d array according to the value at a specified row.INDArrayNDArrayFactory. sortCooIndices(INDArray x)static INDArrayNd4j. sortRows(INDArray in, int colIdx, boolean ascending)Sort (shuffle) the rows of a 2d array according to the value at a specified column.static INDArray[]Nd4j. sortWithIndices(INDArray ndarray, int dimension, boolean ascending)Sort an ndarray along a particular dimension.
Note that the input array is modified in-place.static INDArrayNd4j. specialConcat(int dimension, @NonNull INDArray... toConcat)Concatenate ndarrays along a dimension PLEASE NOTE: This method is special for GPU backend, it works on HOST side only.INDArrayNDArrayFactory. specialConcat(int dimension, INDArray... toConcat)Concatenate ndarrays along a dimension PLEASE NOTE: This method is special for GPU backend, it works on HOST side only.static INDArrayNd4j. squeeze(INDArray input, int dimension)Squeeze : removes a dimension of size 1static INDArrayNd4j. stack(int axis, @NonNull INDArray... values)Stack a set of N SDVariables of rank X into one rank X+1 variable.static INDArrayNd4j. std(INDArray compute)Seestd(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. std(INDArray compute, int dimension)Seestd(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. stripOnes(INDArray toStrip)Reshapes an ndarray to remove leading 1sstatic INDArrayBroadcast. sub(INDArray x, INDArray y, INDArray z, int... dimensions)Broadcast subtraction op.static INDArrayNd4j. sum(INDArray compute)Seesum(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. sum(INDArray compute, int dimension)Seesum(int...)with Integer.MAX_VALUE for full array reduction.INDArrayBaseBlasWrapper. swap(INDArray x, INDArray y)INDArrayBlasWrapper. swap(INDArray x, INDArray y)Compute x <-> y (swap two matrices)intBaseBlasWrapper. syev(char jobz, char uplo, INDArray a, INDArray w)intBlasWrapper. syev(char jobz, char uplo, INDArray a, INDArray w)intBaseBlasWrapper. syevd(char jobz, char uplo, INDArray A, INDArray w)intBlasWrapper. syevd(char jobz, char uplo, INDArray A, INDArray w)intBaseBlasWrapper. syevr(char jobz, char range, char uplo, INDArray a, double vl, double vu, int il, int iu, double abstol, INDArray w, INDArray z, int[] isuppz)intBaseBlasWrapper. syevr(char jobz, char range, char uplo, INDArray a, float vl, float vu, int il, int iu, float abstol, INDArray w, INDArray z, int[] isuppz)intBaseBlasWrapper. syevr(char jobz, char range, char uplo, INDArray a, float vl, float vu, int il, int iu, Number abstol, INDArray w, INDArray z, int[] isuppz)intBlasWrapper. syevr(char jobz, char range, char uplo, INDArray a, double vl, double vu, int il, int iu, double abstol, INDArray w, INDArray z, int[] isuppz)Deprecated.intBlasWrapper. syevr(char jobz, char range, char uplo, INDArray a, float vl, float vu, int il, int iu, float abstol, INDArray w, INDArray z, int[] isuppz)Deprecated.intBlasWrapper. syevr(char jobz, char range, char uplo, INDArray a, float vl, float vu, int il, int iu, Number abstol, INDArray w, INDArray z, int[] isuppz)intBaseBlasWrapper. syevx(char jobz, char range, char uplo, INDArray a, double vl, double vu, int il, int iu, double abstol, INDArray w, INDArray z)intBaseBlasWrapper. syevx(char jobz, char range, char uplo, INDArray a, float vl, float vu, int il, int iu, float abstol, INDArray w, INDArray z)intBlasWrapper. syevx(char jobz, char range, char uplo, INDArray a, double vl, double vu, int il, int iu, double abstol, INDArray w, INDArray z)intBlasWrapper. syevx(char jobz, char range, char uplo, INDArray a, float vl, float vu, int il, int iu, float abstol, INDArray w, INDArray z)intBaseBlasWrapper. sygvd(int itype, char jobz, char uplo, INDArray A, INDArray B, INDArray W)intBlasWrapper. sygvd(int itype, char jobz, char uplo, INDArray A, INDArray B, INDArray W)INDArrayBaseBlasWrapper. sysv(char uplo, INDArray a, int[] ipiv, INDArray b)INDArrayBlasWrapper. sysv(char uplo, INDArray a, int[] ipiv, INDArray b)static INDArray[]Nd4j. tear(INDArray tensor, @lombok.NonNull int... dimensions)This method does the opposite to pile/vstack/hstack - it returns independent TAD copies along given dimensionsINDArray[]NDArrayFactory. tear(INDArray tensor, int... dimensions)static INDArrayNd4j. tensorMmul(INDArray a, INDArray b, int[][] axes)Tensor matrix multiplication.static INDArrayNd4j. tensorMmul(INDArray a, INDArray b, INDArray result, int[][] axes)Tensor matrix multiplication.static INDArrayNd4j. tile(INDArray tile, @lombok.NonNull int... repeat)An alias for repmatstatic byte[]Nd4j. toByteArray(@NonNull INDArray arr)Convert an ndarray to a byte arrayINDArrayBaseNDArrayFactory. toFlattened(char order, INDArray... matrices)INDArrayBaseNDArrayFactory. toFlattened(INDArray... matrices)static INDArrayNd4j. toFlattened(char order, @NonNull INDArray... matrices)Create a long row vector of all of the given ndarrays/static INDArrayNd4j. toFlattened(@NonNull INDArray... matrices)Create a long row vector of all of the given ndarraysINDArrayNDArrayFactory. toFlattened(char order, INDArray... matrices)Flatten all of the ndarrays in to one long vectorINDArrayNDArrayFactory. toFlattened(INDArray... matrices)Flatten all of the ndarrays in to one long vectorstatic byte[]Nd4j. toNpyByteArray(INDArray input)Converts anINDArrayto a byte arraystatic INDArrayNd4j. triu(INDArray m, int k)Upper triangle of an array.static voidNDValidation. validateBool(String opName, String inputName, INDArray v)Validate that the operation is being applied on a boolean type INDArraystatic voidNDValidation. validateBool(String opName, INDArray v)Validate that the operation is being applied on a boolean type INDArraystatic voidNDValidation. validateBool(String opName, INDArray v1, INDArray v2)Validate that the operation is being applied on boolean INDArraysstatic voidBroadcast. validateBroadcastDims(INDArray x, INDArray y, INDArray z, int... dimensions)Validate the broadcast dimensions for manual broadcast ops such asBroadcastMulOp.static voidNDValidation. validateFloatingPoint(String opName, String inputName, INDArray v)Validate that the operation is being applied on a floating point type INDArraystatic voidNDValidation. validateFloatingPoint(String opName, INDArray v)Validate that the operation is being applied on an floating point type INDArraystatic voidNDValidation. validateInteger(String opName, String inputName, INDArray v)Validate that the operation is being applied on an integer type INDArraystatic voidNDValidation. validateInteger(String opName, String inputName, INDArray[] v)Validate that the operation is being applied on an integer type INDArray []static voidNDValidation. validateInteger(String opName, INDArray v)Validate that the operation is being applied on an integer type INDArraystatic voidNDValidation. validateNumerical(String opName, String inputName, INDArray v)Validate that the operation is being applied on a numerical INDArray (not boolean or utf8).static voidNDValidation. validateNumerical(String opName, String inputName, INDArray[] v)Validate that the operation is being applied on numerical INDArrays (not boolean or utf8).static voidNDValidation. validateNumerical(String opName, INDArray v)Validate that the operation is being applied on a numerical INDArray (not boolean or utf8).static voidNDValidation. validateNumerical(String opName, INDArray[] v)Validate that the operation is being applied on numerical INDArrays (not boolean or utf8).static voidNDValidation. validateNumerical(String opName, INDArray v1, INDArray v2)Validate that the operation is being applied on numerical INDArrays (not boolean or utf8).static voidNDValidation. 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))static voidBroadcast. validateShapesNoDimCase(INDArray x, INDArray y, INDArray z)static INDArrayNd4j. var(INDArray compute)Seevar(int...)with Integer.MAX_VALUE for full array reduction.static INDArrayNd4j. var(INDArray compute, int dimension)Seevar(int...)with Integer.MAX_VALUE for full array reduction.INDArrayBaseNDArrayFactory. vstack(INDArray... arrs)Concatenates two matrices vertically.static INDArrayNd4j. vstack(@NonNull INDArray... arrs)Concatenates two matrices vertically.INDArrayNDArrayFactory. vstack(INDArray... arrs)Concatenates two matrices vertically.static INDArray[]Nd4j. where(INDArray condition, INDArray x, INDArray y)Similar to numpy.where operation.static voidNd4j. write(OutputStream writer, INDArray write)Y Write an ndarray to a writerstatic voidNd4j. write(INDArray arr, DataOutputStream dataOutputStream)Write an ndarray to the specified outputstreamstatic voidNd4j. writeAsNumpy(INDArray arr, File file)static voidNd4j. writeAsNumpy(INDArray arr, OutputStream writeTo)Writes an array to an output streamstatic voidNd4j. writeTxt(INDArray write, String filePath)Write NDArray to a text filestatic voidNd4j. writeTxt(INDArray write, String filePath, int precision)Deprecated.Defaults to scientific notation with 18 digits after the decimal UseNd4j.writeTxt(INDArray, String)static voidNd4j. writeTxt(INDArray write, String filePath, String split)Deprecated.custom col and higher dimension separators are no longer supported; uses "," UseNd4j.writeTxt(INDArray, String)static voidNd4j. writeTxt(INDArray write, String filePath, String split, int precision)Deprecated.Precision is no longer used.static INDArrayNd4j. zerosLike(INDArray arr)Empty likeMethod parameters in org.nd4j.linalg.factory with type arguments of type INDArray Modifier and Type Method Description static INDArrayNd4j. accumulate(INDArray target, Collection<INDArray> arrays)This method sums given arrays and stores them to a given target arrayINDArrayNDArrayFactory. average(Collection<INDArray> arrays)This method averages input arrays, and returns averaged arrayINDArrayNDArrayFactory. average(INDArray target, Collection<INDArray> arrays)This method averages input arrays, and returns averaged arraystatic INDArrayNd4j. averageAndPropagate(Collection<INDArray> arrays)This method averages input arrays, and returns averaged array.static INDArrayNd4j. averageAndPropagate(INDArray target, Collection<INDArray> arrays)This method averages input arrays, and returns averaged array.abstract INDArrayBaseNDArrayFactory. create(List<INDArray> list, int[] shape)Creates an ndarray with the specified shapestatic INDArrayNd4j. create(List<INDArray> list, int... shape)Creates an array with the specified shape from a list of arrays.static INDArrayNd4j. create(List<INDArray> list, long... shape)INDArrayNDArrayFactory. create(List<INDArray> list, int[] shape)Creates an ndarray with the specified shapeINDArrayNDArrayFactory. create(List<INDArray> list, int[] shape, char ordering)INDArrayNDArrayFactory. create(List<INDArray> list, long[] shape)INDArrayNDArrayFactory. create(List<INDArray> list, long[] shape, char ordering)static INDArrayNd4j. hstack(Collection<INDArray> arrs)Concatenates two matrices horizontally.static INDArrayNd4j. pile(@NonNull Collection<INDArray> arrays)This method stacks vertically examples with the same shape, increasing result dimensionality.static voidNd4j. shuffle(Collection<INDArray> toShuffle, @lombok.NonNull int... dimension)Symmetric in place shuffle of an ndarray along a specified set of dimensionsstatic voidNd4j. shuffle(Collection<INDArray> toShuffle, Random rnd, @lombok.NonNull int... dimension)Symmetric in place shuffle of an ndarray along a specified set of dimensionsstatic voidNd4j. shuffle(List<INDArray> toShuffle, Random rnd, List<int[]> dimensions)Symmetric in place shuffle of an ndarray along a variable dimensionsvoidNDArrayFactory. shuffle(Collection<INDArray> array, Random rnd, int... dimension)Symmetric in place shuffle of an ndarray along a specified set of dimensions.voidNDArrayFactory. shuffle(List<INDArray> array, Random rnd, List<int[]> dimensions)Symmetric in place shuffle of an ndarray along a specified set of dimensions.INDArrayBaseNDArrayFactory. toFlattened(Collection<INDArray> matrices)Returns a vector with all of the elements in every nd array equal to the sum of the lengths of the ndarraysstatic INDArrayNd4j. toFlattened(char order, Collection<INDArray> matrices)Create a long row vector of all of the given ndarraysstatic INDArrayNd4j. toFlattened(Collection<INDArray> matrices)Create a long row vector of all of the given ndarraysINDArrayNDArrayFactory. toFlattened(char order, Collection<INDArray> matrices)Returns a flattened ndarray with all elements in each ndarray regardless of dimension.INDArrayNDArrayFactory. toFlattened(Collection<INDArray> matrices)/** Returns a flattened ndarray with all of the elements in each ndarray regardless of dimensionstatic INDArrayNd4j. vstack(Collection<INDArray> arrs)Concatenates two matrices vertically. -
Uses of INDArray in org.nd4j.linalg.factory.ops
Methods in org.nd4j.linalg.factory.ops that return INDArray Modifier and Type Method Description INDArrayNDMath. abs(INDArray x)Elementwise absolute value operation: out = abs(x)INDArrayNDLoss. absoluteDifference(INDArray label, INDArray predictions, INDArray weights)Absolute difference loss:sum_i abs( label[i] - predictions[i] )INDArrayNDLoss. absoluteDifference(INDArray label, INDArray predictions, INDArray weights, LossReduce lossReduce)Absolute difference loss:sum_i abs( label[i] - predictions[i] )INDArrayNDMath. acos(INDArray x)Elementwise acos (arccosine, inverse cosine) operation: out = arccos(x)INDArrayNDMath. acosh(INDArray x)Elementwise acosh (inverse hyperbolic cosine) function: out = acosh(x)INDArrayNDMath. add(INDArray x, double value)Scalar add operation, out = in + scalarINDArrayNDMath. add(INDArray x, INDArray y)Pairwise addition operation, out = x + y
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDImage. adjustContrast(INDArray in, double factor)Adjusts contrast of RGB or grayscale images.INDArrayNDImage. adjustHue(INDArray in, double delta)Adjust hue of RGB imageINDArrayNDImage. adjustSaturation(INDArray in, double factor)Adjust saturation of RGB imagesINDArrayNDBase. all(INDArray x, int... dimensions)Boolean and array reduction operation, optionally along specified dimensionsINDArrayNDBitwise. and(INDArray x, INDArray y)Bitwise AND operation.INDArrayNDMath. and(INDArray x, INDArray y)Boolean AND operation: elementwise (x != 0) && (y != 0)
If x and y arrays have equal shape, the output shape is the same as these inputs.
Note: supports broadcasting if x and y have different shapes and are broadcastable.
Returns an array with values 1 where condition is satisfied, or value 0 otherwise.INDArrayNDBase. any(INDArray x, int... dimensions)Boolean or array reduction operation, optionally along specified dimensionsINDArrayNDBase. argmax(INDArray in, boolean keepDims, int... dimensions)Argmax array reduction operation, optionally along specified dimensions.
Output values are the index of the maximum value of each slice along the specified dimension.
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. argmax(INDArray in, int... dimensions)Argmax array reduction operation, optionally along specified dimensions.
Output values are the index of the maximum value of each slice along the specified dimension.
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. argmin(INDArray in, boolean keepDims, int... dimensions)Argmin array reduction operation, optionally along specified dimensions.
Output values are the index of the minimum value of each slice along the specified dimension.
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. argmin(INDArray in, int... dimensions)Argmin array reduction operation, optionally along specified dimensions.
Output values are the index of the minimum value of each slice along the specified dimension.
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. asin(INDArray x)Elementwise asin (arcsin, inverse sine) operation: out = arcsin(x)INDArrayNDMath. asinh(INDArray x)Elementwise asinh (inverse hyperbolic sine) function: out = asinh(x)INDArrayNDBase. assign(INDArray x, INDArray y)Assign the contents of y to x.
Y must be broadcastable to x or the same shape.INDArrayNDMath. asum(INDArray in, boolean keepDims, int... dimensions)Absolute sum array reduction operation, optionally along specified dimensions: out = sum(abs(x))INDArrayNDMath. asum(INDArray in, int... dimensions)Absolute sum array reduction operation, optionally along specified dimensions: out = sum(abs(x))INDArrayNDMath. atan(INDArray x)Elementwise atan (arctangent, inverse tangent) operation: out = arctangent(x)INDArrayNDMath. atan2(INDArray y, INDArray x)Elementwise atan (arctangent, inverse tangent) operation: out = atan2(x,y).
Similar to atan(y/x) but sigts of x and y are used to determine the location of the resultINDArrayNDMath. atanh(INDArray x)Elementwise atanh (inverse hyperbolic tangent) function: out = atanh(x)INDArrayNDCNN. avgPooling2d(INDArray input, Pooling2DConfig Pooling2DConfig)2D Convolution layer operation - average pooling 2dINDArrayNDCNN. avgPooling3d(INDArray input, Pooling3DConfig Pooling3DConfig)3D convolution layer operation - average pooling 3dINDArray[]NDBase. batchMmul(INDArray[] inputsA, INDArray... inputsB)Matrix multiply a batch of matrices.INDArray[]NDBase. batchMmul(INDArray[] inputsA, INDArray[] inputsB, boolean transposeA, boolean transposeB)Matrix multiply a batch of matrices.INDArrayNDNN. batchNorm(INDArray input, INDArray mean, INDArray variance, INDArray gamma, INDArray beta, double epsilon, int... axis)INDArrayNDCNN. batchToSpace(INDArray x, int[] blocks, int[] croppingTop, int... croppingBottom)Convolution 2d layer batch to space operation on 4d input.
Reduces input batch dimension by rearranging data into a larger spatial dimensionsINDArrayNDRandom. bernoulli(double p, DataType datatype, long... shape)Generate a new random INDArray, where values are randomly sampled according to a Bernoulli distribution,
with the specified probability.INDArrayNDNN. biasAdd(INDArray input, INDArray bias, boolean nchw)Bias addition operation: a special case of addition, typically used with CNN 4D activations and a 1D bias vectorINDArrayNDRandom. binomial(int nTrials, double p, DataType datatype, long... shape)Generate a new random INDArray, where values are randomly sampled according to a Binomial distribution,
with the specified number of trials and probability.INDArrayNDBitwise. bitRotl(INDArray x, INDArray shift)Roll integer bits to the left, i.e.INDArrayNDBitwise. bitRotr(INDArray x, INDArray shift)Roll integer bits to the right, i.e.INDArrayNDBitwise. bitsHammingDistance(INDArray x, INDArray y)Bitwise Hamming distance reduction over all elements of both input arrays.
For example, if x=01100000 and y=1010000 then the bitwise Hamming distance is 2 (due to differences at positions 0 and 1)
Inputs must satisfy the following constraints:
Must be same types: isSameType(x, y)INDArrayNDBitwise. bitShift(INDArray x, INDArray shift)Shift integer bits to the left, i.e.INDArrayNDMath. bitShift(INDArray x, INDArray shift)Bit shift operationINDArrayNDBitwise. bitShiftRight(INDArray x, INDArray shift)Shift integer bits to the right, i.e.INDArrayNDMath. bitShiftRight(INDArray x, INDArray shift)Right bit shift operationINDArrayNDMath. bitShiftRotl(INDArray x, INDArray shift)Cyclic bit shift operationINDArrayNDMath. bitShiftRotr(INDArray x, INDArray shift)Cyclic right shift operationINDArrayNDBase. castTo(INDArray arg, DataType datatype)Cast the array to a new datatype - for example, Integer -> FloatINDArrayNDMath. ceil(INDArray x)Element-wise ceiling function: out = ceil(x).
Rounds each value up to the nearest integer value (if not already an integer)INDArrayNDLinalg. cholesky(INDArray input)Computes the Cholesky decomposition of one or more square matrices.INDArrayNDMath. clipByAvgNorm(INDArray x, double clipValue, int... dimensions)Clips tensor values to a maximum average L2-norm.INDArrayNDBase. clipByNorm(INDArray x, double clipValue)Returns a clipped ndarray such that the input is normalized so that its L2 norm
is <= the specified value.INDArrayNDBase. clipByNorm(INDArray x, INDArray clipValue, INDArray dimensions)Returns a clipped ndarray such that the input is normalized so that its L2 norm
is <= the specified value.INDArrayNDMath. clipByNorm(INDArray x, double clipValue, int... dimensions)Clipping by L2 norm, optionally along dimension(s)
if l2Norm(x,dimension) < clipValue, then input is returned unmodifed
Otherwise, out[i] = in[i] * clipValue / l2Norm(in, dimensions) where each value is clipped according
to the corresponding l2Norm along the specified dimensionsINDArrayNDBase. clipByValue(INDArray x, double clipValueMin, double clipValueMax)Return the clipped ndarray containing values no smaller or larger than the given min and max.INDArrayNDBase. clipByValue(INDArray x, INDArray clipValueMin, INDArray clipValueMax)Return the clipped ndarray containing values no smaller or larger than the given min and max.INDArrayNDMath. clipByValue(INDArray x, double clipValueMin, double clipValueMax)Element-wise clipping function:
out[i] = in[i] if in[i] >= clipValueMin and in[i] <= clipValueMax
out[i] = clipValueMin if in[i] < clipValueMin
out[i] = clipValueMax if in[i] > clipValueMaxINDArrayNDCNN. col2Im(INDArray in, Conv2DConfig Conv2DConfig)col2im operation for use in 2D convolution operations.INDArrayNDBase. concat(int dimension, INDArray... inputs)Concatenate a set of inputs along the specified dimension.
Note that inputs must have identical rank and identical dimensions, other than the dimension to stack on.
For example, if 2 inputs have shape [a, x, c] and [a, y, c] and dimension = 1, then the output has shape [a, x+y, c]
Inputs must satisfy the following constraints:
Input arrays must all be the same datatype: isSameType(inputs)INDArrayNDMath. confusionMatrix(INDArray labels, INDArray pred, int numClasses)Compute the 2d confusion matrix of size [numClasses, numClasses] from a pair of labels and predictions, both of
which are represented as integer values.
For example, if labels = [0, 1, 1], predicted = [0, 2, 1], and numClasses=4 then output is:
[1, 0, 0, 0]
[0, 1, 1, 0]
[0, 0, 0, 0]
[0, 0, 0, 0]INDArrayNDMath. confusionMatrix(INDArray labels, INDArray pred, DataType dataType)Compute the 2d confusion matrix of size [numClasses, numClasses] from a pair of labels and predictions, both of
which are represented as integer values.INDArrayNDMath. confusionMatrix(INDArray labels, INDArray pred, INDArray weights)Compute the 2d confusion matrix of size [numClasses, numClasses] from a pair of labels and predictions, both of
which are represented as integer values.INDArrayNDMath. confusionMatrix(INDArray labels, INDArray pred, INDArray weights, int numClasses)Compute the 2d confusion matrix of size [numClasses, numClasses] from a pair of labels and predictions, both of
which are represented as integer values.
For example, if labels = [0, 1, 1], predicted = [0, 2, 1], numClasses = 4, and weights = [1, 2, 3]
[1, 0, 0, 0]
[0, 3, 2, 0]
[0, 0, 0, 0]
[0, 0, 0, 0]INDArrayNDCNN. conv1d(INDArray input, INDArray weights, INDArray bias, Conv1DConfig Conv1DConfig)Conv1d operation.INDArrayNDCNN. conv1d(INDArray input, INDArray weights, Conv1DConfig Conv1DConfig)Conv1d operation.INDArrayNDCNN. conv2d(INDArray layerInput, INDArray weights, INDArray bias, Conv2DConfig Conv2DConfig)2D Convolution operation with optional biasINDArrayNDCNN. conv2d(INDArray layerInput, INDArray weights, Conv2DConfig Conv2DConfig)2D Convolution operation with optional biasINDArrayNDCNN. conv3d(INDArray input, INDArray weights, INDArray bias, Conv3DConfig Conv3DConfig)Convolution 3D operation with optional biasINDArrayNDCNN. conv3d(INDArray input, INDArray weights, Conv3DConfig Conv3DConfig)Convolution 3D operation with optional biasINDArrayNDMath. cos(INDArray x)Elementwise cosine operation: out = cos(x)INDArrayNDMath. cosh(INDArray x)Elementwise cosh (hyperbolic cosine) operation: out = cosh(x)INDArrayNDLoss. cosineDistance(INDArray label, INDArray predictions, INDArray weights, int dimension)Cosine distance loss:1 - cosineSimilarity(x,y)or1 - sum_i label[i] * prediction[i], which is
equivalent to cosine distance when both the predictions and labels are normalized.
Note: This loss function assumes that both the predictions and labels are normalized to have unit l2 norm.
If this is not the case, you should normalize them first by dividing by norm2(String, SDVariable, boolean, int...)
along the cosine distance dimension (with keepDims=true).INDArrayNDLoss. cosineDistance(INDArray label, INDArray predictions, INDArray weights, LossReduce lossReduce, int dimension)Cosine distance loss:1 - cosineSimilarity(x,y)or1 - sum_i label[i] * prediction[i], which is
equivalent to cosine distance when both the predictions and labels are normalized.
Note: This loss function assumes that both the predictions and labels are normalized to have unit l2 norm.
If this is not the case, you should normalize them first by dividing by norm2(String, SDVariable, boolean, int...)
along the cosine distance dimension (with keepDims=true).INDArrayNDMath. cosineDistance(INDArray x, INDArray y, boolean keepDims, boolean isComplex, int... dimensions)Cosine distance reduction operation.INDArrayNDMath. cosineDistance(INDArray x, INDArray y, int... dimensions)Cosine distance reduction operation.INDArrayNDMath. cosineSimilarity(INDArray x, INDArray y, boolean keepDims, boolean isComplex, int... dimensions)Cosine similarity pairwise reduction operation.INDArrayNDMath. cosineSimilarity(INDArray x, INDArray y, int... dimensions)Cosine similarity pairwise reduction operation.INDArrayNDMath. countNonZero(INDArray in, boolean keepDims, int... dimensions)Count non zero array reduction operation, optionally along specified dimensions: out = count(x != 0)INDArrayNDMath. countNonZero(INDArray in, int... dimensions)Count non zero array reduction operation, optionally along specified dimensions: out = count(x != 0)INDArrayNDMath. countZero(INDArray in, boolean keepDims, int... dimensions)Count zero array reduction operation, optionally along specified dimensions: out = count(x == 0)INDArrayNDMath. countZero(INDArray in, int... dimensions)Count zero array reduction operation, optionally along specified dimensions: out = count(x == 0)INDArrayNDBase. create(INDArray shape, DataType dataType)Return a newly created variable, with the specified shape and data type.INDArrayNDBase. create(INDArray shape, DataType dataType, String order, boolean initialize)Return a newly created variable, with the specified shape and data type.INDArrayNDBase. createView(INDArray input, INDArray... indices)Return a newly created variable, with the specified shape and data type.INDArrayNDNN. cReLU(INDArray x)Concatenates a ReLU which selects only the positive part of the activation with a ReLU which selects only the negative part of the activation.INDArrayNDImage. cropAndResize(INDArray image, INDArray cropBoxes, INDArray boxIndices, INDArray cropOutSize)Given an input image and some crop boxes, extract out the image subsets and resize them to the specified size.INDArrayNDImage. cropAndResize(INDArray image, INDArray cropBoxes, INDArray boxIndices, INDArray cropOutSize, double extrapolationValue)Given an input image and some crop boxes, extract out the image subsets and resize them to the specified size.INDArrayNDLinalg. cross(INDArray a, INDArray b)Computes pairwise cross product.INDArrayNDMath. cross(INDArray a, INDArray b)Returns the pair-wise cross product of equal size arrays a and b: a x b = ||a||x||b|| sin(theta).
Can take rank 1 or above inputs (of equal shapes), but note that the last dimension must have dimension 3INDArrayNDLoss. ctcLoss(INDArray targetLabels, INDArray logitInput, INDArray targetLabelLengths, INDArray logitInputLengths)CTC Loss: Connectionist Temporal Classification Loss.INDArrayNDMath. cube(INDArray x)Element-wise cube function: out = x^3INDArrayNDBase. cumprod(INDArray in, boolean exclusive, boolean reverse, int... axis)Cumulative product operation.
For input: [ a, b, c], output is:
exclusive=false, reverse=false: [a, a*b, a*b*c]
exclusive=true, reverse=false, [0, a, a*b]
exclusive=false, reverse=true: [a*b*c, b*c, c]
exclusive=true, reverse=true: [b*c, c, 0]INDArrayNDBase. cumprod(INDArray in, int... axis)Cumulative product operation.
For input: [ a, b, c], output is:
exclusive=false, reverse=false: [a, a*b, a*b*c]
exclusive=true, reverse=false, [0, a, a*b]
exclusive=false, reverse=true: [a*b*c, b*c, c]
exclusive=true, reverse=true: [b*c, c, 0]INDArrayNDBase. cumsum(INDArray in, boolean exclusive, boolean reverse, int... axis)Cumulative sum operation.
For input: [ a, b, c], output is:
exclusive=false, reverse=false: [a, a+b, a+b+c]
exclusive=true, reverse=false, [0, a, a+b]
exclusive=false, reverse=true: [a+b+c, b+c, c]
exclusive=true, reverse=true: [b+c, c, 0]INDArrayNDBase. cumsum(INDArray in, int... axis)Cumulative sum operation.
For input: [ a, b, c], output is:
exclusive=false, reverse=false: [a, a+b, a+b+c]
exclusive=true, reverse=false, [0, a, a+b]
exclusive=false, reverse=true: [a+b+c, b+c, c]
exclusive=true, reverse=true: [b+c, c, 0]INDArrayNDCNN. deconv2d(INDArray layerInput, INDArray weights, INDArray bias, DeConv2DConfig DeConv2DConfig)2D deconvolution operation with optional biasINDArrayNDCNN. deconv2d(INDArray layerInput, INDArray weights, DeConv2DConfig DeConv2DConfig)2D deconvolution operation with optional biasINDArrayNDCNN. deconv3d(INDArray input, INDArray weights, INDArray bias, DeConv3DConfig DeConv3DConfig)3D CNN deconvolution operation with or without optional biasINDArrayNDCNN. deconv3d(INDArray input, INDArray weights, DeConv3DConfig DeConv3DConfig)3D CNN deconvolution operation with or without optional biasINDArrayNDCNN. depthToSpace(INDArray x, int blockSize, DataFormat dataFormat)Convolution 2d layer batch to space operation on 4d input.
Reduces input channels dimension by rearranging data into a larger spatial dimensions
Example: if input has shape [mb, 8, 2, 2] and block size is 2, then output size is [mb, 8/(2*2), 2*2, 2*2]
= [mb, 2, 4, 4]INDArrayNDCNN. depthWiseConv2d(INDArray layerInput, INDArray depthWeights, INDArray bias, Conv2DConfig Conv2DConfig)Depth-wise 2D convolution operation with optional biasINDArrayNDCNN. depthWiseConv2d(INDArray layerInput, INDArray depthWeights, Conv2DConfig Conv2DConfig)Depth-wise 2D convolution operation with optional biasINDArrayNDLinalg. diag(INDArray input)Calculates diagonal tensor.INDArrayNDMath. diag(INDArray x)Returns an output variable with diagonal values equal to the specified values; off-diagonal values will be set to 0
For example, if input = [1,2,3], then output is given by:
[ 1, 0, 0]
[ 0, 2, 0]
[ 0, 0, 3]
Higher input ranks are also supported: if input has shape [a,...,R-1] then output[i,...,k,i,...,k] = input[i,...,k].
i.e., for input rank R, output has rank 2RINDArrayNDLinalg. diag_part(INDArray input)Calculates diagonal tensor.INDArrayNDMath. diagPart(INDArray x)Extract the diagonal part from the input array.
If input is
[ 1, 0, 0]
[ 0, 2, 0]
[ 0, 0, 3]
then output is [1, 2, 3].
Supports higher dimensions: in general, out[i,...,k] = in[i,...,k,i,...,k]INDArrayNDCNN. dilation2D(INDArray df, INDArray weights, int[] strides, int[] rates, boolean isSameMode)TODO doc stringINDArrayNDMath. div(INDArray x, double value)Scalar division operation, out = in / scalarINDArrayNDMath. div(INDArray x, INDArray y)Pairwise division operation, out = x / y
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDBase. dot(INDArray x, INDArray y, int... dimensions)Pairwise dot product reduction along dimension
output = sum(i=0 ...INDArrayNDNN. dotProductAttention(INDArray queries, INDArray keys, INDArray values, INDArray mask, boolean scaled)This operation performs dot product attention on the given timeseries input with the given queries
out = sum(similarity(k_i, q) * v_i)
similarity(k, q) = softmax(k * q) where x * q is the dot product of x and q
Optionally with normalization step:
similarity(k, q) = softmax(k * q / sqrt(size(q))
See also "Attention is all you need" (https://arxiv.org/abs/1706.03762, p.INDArrayNDNN. dropout(INDArray input, double inputRetainProbability)Dropout operationINDArrayNDNN. dropoutInverted(INDArray input, double p)Dropout inverted operation.INDArray[]NDBase. dynamicPartition(INDArray x, INDArray partitions, int numPartitions)Dynamically partition the input variable values into the specified number of paritions, using the indices.
Example:INDArrayNDBase. dynamicStitch(INDArray[] indices, INDArray... x)Dynamically merge the specified input arrays into a single array, using the specified indicesINDArray[]NDLinalg. eig(INDArray input)Calculates eigen valuesINDArrayNDNN. elu(INDArray x)Element-wise exponential linear unit (ELU) function:
out = x if x > 0
out = a * (exp(x) - 1) if x <= 0
with constant a = 1.0INDArrayNDMath. embeddingLookup(INDArray x, INDArray indices, PartitionMode PartitionMode)Looks up ids in a list of embedding tensors.INDArrayNDMath. entropy(INDArray in, boolean keepDims, int... dimensions)Entropy reduction: -sum(x * log(x))INDArrayNDMath. entropy(INDArray in, int... dimensions)Entropy reduction: -sum(x * log(x))INDArrayNDBase. eq(INDArray x, double y)Equals operation: elementwise x == y
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDBase. eq(INDArray x, INDArray y)Equal to operation: elementwise x == y
If x and y arrays have equal shape, the output shape is the same as these inputs.
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDMath. erf(INDArray x)Element-wise Gaussian error function - out = erf(in)INDArrayNDMath. erfc(INDArray x)Element-wise complementary Gaussian error function - out = erfc(in) = 1 - erf(in)INDArrayNDMath. euclideanDistance(INDArray x, INDArray y, boolean keepDims, boolean isComplex, int... dimensions)Euclidean distance (l2 norm, l2 distance) reduction operation.INDArrayNDMath. euclideanDistance(INDArray x, INDArray y, int... dimensions)Euclidean distance (l2 norm, l2 distance) reduction operation.INDArrayNDMath. exp(INDArray x)Elementwise exponent function: out = exp(x) = 2.71828...^xINDArrayNDBase. expandDims(INDArray x, int axis)Reshape the input by adding a 1 at the specified location.
For example, if input has shape [a, b], then output shape is:
axis = 0: [1, a, b]
axis = 1: [a, 1, b]
axis = 2: [a, b, 1]INDArrayNDMath. expm1(INDArray x)Elementwise 1.0 - exponent function: out = 1.0 - exp(x) = 1.0 - 2.71828...^xINDArrayNDRandom. exponential(double lambda, DataType datatype, long... shape)Generate a new random INDArray, where values are randomly sampled according to a exponential distribution:
P(x) = lambda * exp(-lambda * x)
Inputs must satisfy the following constraints:
Must be positive: lambda > 0INDArrayNDCNN. extractImagePatches(INDArray input, int kH, int kW, int sH, int sW, int rH, int rW, boolean sameMode)Extract image patchesINDArrayNDImage. extractImagePatches(INDArray image, int[] kSizes, int[] strides, int[] rates, boolean sameMode)Given an input image, extract out image patches (of size kSizes - h x w) and place them in the depth dimension.INDArrayNDMath. eye(int rows)Generate an identity matrix with the specified number of rows and columns.INDArrayNDMath. eye(int rows, int cols)As per eye(String, int, int, DataType) but with the default datatype, Eye.DEFAULT_DTYPEINDArrayNDMath. eye(int rows, int cols, DataType dataType, int... dimensions)Generate an identity matrix with the specified number of rows and columns
Example:INDArrayNDMath. eye(INDArray rows)As per eye(String, int) but with the number of rows specified as a scalar INDArrayINDArrayNDMath. eye(INDArray rows, INDArray cols)As per eye(int, int) bit with the number of rows/columns specified as scalar INDArraysINDArrayNDBase. fill(INDArray shape, DataType dataType, double value)Generate an output variable with the specified (dynamic) shape with all elements set to the specified valueINDArrayNDMath. firstIndex(INDArray in, Condition condition, boolean keepDims, int... dimensions)First index reduction operation.
Returns a variable that contains the index of the first element that matches the specified condition (for each
slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. firstIndex(INDArray in, Condition condition, int... dimensions)First index reduction operation.
Returns a variable that contains the index of the first element that matches the specified condition (for each
slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. flatten(INDArray... inputs)Return a flattened variable with the specified orderingINDArrayNDBase. flatten(INDArray[] inputs, String order)Return a flattened variable with the specified orderingINDArrayNDMath. floor(INDArray x)Element-wise floor function: out = floor(x).
Rounds each value down to the nearest integer value (if not already an integer)INDArrayNDMath. floorDiv(INDArray x, INDArray y)Pairwise floor division operation, out = floor(x / y)
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDMath. floorMod(INDArray x, double value)Scalar floor modulus operationINDArrayNDMath. floorMod(INDArray x, INDArray y)Pairwise Modulus division operation
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDBase. gather(INDArray df, int[] indices, int axis)Gather slices from the input variable where the indices are specified as fixed int[] values.
Output shape is same as input shape, except for axis dimension, which has size equal to indices.length.INDArrayNDBase. gather(INDArray df, INDArray indices, int axis)Gather slices from the input variable where the indices are specified as dynamic array values.
Output shape is same as input shape, except for axis dimension, which has size equal to indices.length.INDArrayNDBase. gatherNd(INDArray df, INDArray indices)Gather slices from df with shape specified by indices.INDArrayNDNN. gelu(INDArray x)GELU activation function - Gaussian Error Linear Units
For more details, see Gaussian Error Linear Units (GELUs) - https://arxiv.org/abs/1606.08415
This method uses the sigmoid approximationINDArrayNDRNN. gru(INDArray x, INDArray hLast, INDArray Wx, INDArray Wh, INDArray biases)The GRU operation.INDArray[]NDRNN. gruCell(INDArray x, INDArray hLast, GRUWeights GRUWeights)The GRU cell.INDArrayNDBase. gt(INDArray x, double y)Greater than operation: elementwise x > y
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDBase. gt(INDArray x, INDArray y)Greater than operation: elementwise x > y
If x and y arrays have equal shape, the output shape is the same as these inputs.
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDBase. gte(INDArray x, double y)Greater than or equals operation: elementwise x >= y
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDBase. gte(INDArray x, INDArray y)Greater than or equal to operation: elementwise x >= y
If x and y arrays have equal shape, the output shape is the same as these inputs.
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDMath. hammingDistance(INDArray x, INDArray y, boolean keepDims, boolean isComplex, int... dimensions)Hamming distance reduction operation.INDArrayNDMath. hammingDistance(INDArray x, INDArray y, int... dimensions)Hamming distance reduction operation.INDArrayNDNN. hardSigmoid(INDArray x)Element-wise hard sigmoid function:
out[i] = 0 if in[i] <= -2.5
out[1] = 0.2*in[i]+0.5 if -2.5 < in[i] < 2.5
out[i] = 1 if in[i] >= 2.5INDArrayNDNN. hardTanh(INDArray x)Element-wise hard tanh function:
out[i] = -1 if in[i] <= -1
out[1] = in[i] if -1 < in[i] < 1
out[i] = 1 if in[i] >= 1INDArrayNDNN. hardTanhDerivative(INDArray x)Derivative (dOut/dIn) of the element-wise hard Tanh function - hardTanh(INDArray)INDArrayNDLoss. hingeLoss(INDArray label, INDArray predictions, INDArray weights)Hinge loss: a loss function used for training classifiers.
ImplementsL = max(0, 1 - t * predictions)where t is the label values after internally converting to {-1,1}
from the user specified {0,1}.INDArrayNDLoss. hingeLoss(INDArray label, INDArray predictions, INDArray weights, LossReduce lossReduce)Hinge loss: a loss function used for training classifiers.
ImplementsL = max(0, 1 - t * predictions)where t is the label values after internally converting to {-1,1}
from the user specified {0,1}.INDArrayNDImage. hsvToRgb(INDArray input)Converting image from HSV to RGB formatINDArrayNDLoss. huberLoss(INDArray label, INDArray predictions, INDArray weights, double delta)Huber loss function, used for robust regression.INDArrayNDLoss. huberLoss(INDArray label, INDArray predictions, INDArray weights, LossReduce lossReduce, double delta)Huber loss function, used for robust regression.INDArrayNDMath. iamax(INDArray in, boolean keepDims, int... dimensions)Index of the max absolute value: argmax(abs(in))
see argmax(String, INDArray, boolean, int...)INDArrayNDMath. iamax(INDArray in, int... dimensions)Index of the max absolute value: argmax(abs(in))
see argmax(String, INDArray, boolean, int...)INDArrayNDMath. iamin(INDArray in, boolean keepDims, int... dimensions)Index of the min absolute value: argmin(abs(in))
see argmin(String, INDArray, boolean, int...)INDArrayNDMath. iamin(INDArray in, int... dimensions)Index of the min absolute value: argmin(abs(in))
see argmin(String, INDArray, boolean, int...)INDArrayNDBase. identity(INDArray input)Elementwise identity operation: out = xINDArrayNDCNN. im2Col(INDArray in, Conv2DConfig Conv2DConfig)im2col operation for use in 2D convolution operations.INDArrayNDImage. imageResize(INDArray input, INDArray size, boolean preserveAspectRatio, boolean antialias, ImageResizeMethod ImageResizeMethod)Resize images to size using the specified method.INDArrayNDImage. imageResize(INDArray input, INDArray size, ImageResizeMethod ImageResizeMethod)Resize images to size using the specified method.INDArrayNDBase. invertPermutation(INDArray input)Compute the inverse permutation indices for a permutation operation
Example: if input is [2, 0, 1] then output is [1, 2, 0]
The idea is that x.permute(input).permute(invertPermutation(input)) == xINDArrayNDMath. isFinite(INDArray x)Is finite operation: elementwise isFinite(x)
Returns an array with the same shape/size as the input, with values 1 where condition is satisfied, or
value 0 otherwiseINDArrayNDMath. isInfinite(INDArray x)Is infinite operation: elementwise isInfinite(x)
Returns an array with the same shape/size as the input, with values 1 where condition is satisfied, or
value 0 otherwiseINDArrayNDMath. isMax(INDArray x)Is maximum operation: elementwise x == max(x)
Returns an array with the same shape/size as the input, with values 1 where condition is satisfied, or
value 0 otherwiseINDArrayNDMath. isNaN(INDArray x)Is Not a Number operation: elementwise isNaN(x)
Returns an array with the same shape/size as the input, with values 1 where condition is satisfied, or
value 0 otherwiseINDArrayNDMath. isNonDecreasing(INDArray x)Is the array non decreasing?
An array is non-decreasing if for every valid i, x[i] <= x[i+1].INDArrayNDBase. isNumericTensor(INDArray x)Is the director a numeric tensor? In the current version of ND4J/SameDiff, this always returns true/1INDArrayNDMath. isStrictlyIncreasing(INDArray x)Is the array strictly increasing?
An array is strictly increasing if for every valid i, x[i] < x[i+1].INDArrayNDMath. jaccardDistance(INDArray x, INDArray y, boolean keepDims, boolean isComplex, int... dimensions)Jaccard similarity reduction operation.INDArrayNDMath. jaccardDistance(INDArray x, INDArray y, int... dimensions)Jaccard similarity reduction operation.INDArrayNDLoss. l2Loss(INDArray var)L2 loss: 1/2 * sum(x^2)INDArrayNDMath. lastIndex(INDArray in, Condition condition, boolean keepDims, int... dimensions)Last index reduction operation.
Returns a variable that contains the index of the last element that matches the specified condition (for each
slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. lastIndex(INDArray in, Condition condition, int... dimensions)Last index reduction operation.
Returns a variable that contains the index of the last element that matches the specified condition (for each
slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDNN. layerNorm(INDArray input, INDArray gain, boolean channelsFirst, int... dimensions)Apply Layer Normalization
y = gain * standardize(x) + biasINDArrayNDNN. layerNorm(INDArray input, INDArray gain, INDArray bias, boolean channelsFirst, int... dimensions)Apply Layer Normalization
y = gain * standardize(x) + biasINDArrayNDNN. leakyRelu(INDArray x, double alpha)Element-wise leaky ReLU function:
out = x if x >= 0.0
out = alpha * x if x < cutoff
Alpha value is most commonly set to 0.01INDArrayNDNN. leakyReluDerivative(INDArray x, double alpha)Leaky ReLU derivative: dOut/dIn given input.INDArrayNDBitwise. leftShift(INDArray x, INDArray y)Bitwise left shift operation.INDArrayNDBitwise. leftShiftCyclic(INDArray x, INDArray y)Bitwise left cyclical shift operation.INDArrayNDNN. linear(INDArray input, INDArray weights, INDArray bias)Linear layer operation: out = mmul(in,w) + bias
Note that bias array is optionalINDArrayNDBase. linspace(DataType dataType, double start, double stop, long number)Create a new 1d array with values evenly spaced between values 'start' and 'stop'
For example, linspace(start=3.0, stop=4.0, number=3) will generate [3.0, 3.5, 4.0]INDArrayNDBase. linspace(INDArray start, INDArray stop, INDArray number, DataType dataType)Create a new 1d array with values evenly spaced between values 'start' and 'stop'
For example, linspace(start=3.0, stop=4.0, number=3) will generate [3.0, 3.5, 4.0]INDArray[]NDMath. listDiff(INDArray x, INDArray y)Calculates difference between inputs X and Y.INDArrayNDCNN. localResponseNormalization(INDArray input, LocalResponseNormalizationConfig LocalResponseNormalizationConfig)2D convolution layer operation - local response normalizationINDArrayNDMath. log(INDArray x)Element-wise logarithm function (base e - natural logarithm): out = log(x)INDArrayNDMath. log(INDArray x, double base)Element-wise logarithm function (with specified base): out = log_{base}(x)INDArrayNDMath. log1p(INDArray x)Elementwise natural logarithm function: out = log_e (1 + x)INDArrayNDLinalg. logdet(INDArray input)Calculates log of determinant.INDArrayNDMath. logEntropy(INDArray in, boolean keepDims, int... dimensions)Log entropy reduction: log(-sum(x * log(x)))INDArrayNDMath. logEntropy(INDArray in, int... dimensions)Log entropy reduction: log(-sum(x * log(x)))INDArrayNDLoss. logLoss(INDArray label, INDArray predictions)Log loss, i.e., binary cross entropy loss, usually used for binary multi-label classification.INDArrayNDLoss. logLoss(INDArray label, INDArray predictions, INDArray weights, LossReduce lossReduce, double epsilon)Log loss, i.e., binary cross entropy loss, usually used for binary multi-label classification.INDArrayNDRandom. logNormal(double mean, double stddev, DataType datatype, long... shape)Generate a new random INDArray, where values are randomly sampled according to a Log Normal distribution,
i.e.,log(x) ~ N(mean, stdev)INDArrayNDLoss. logPoisson(INDArray label, INDArray predictions, INDArray weights, boolean full)Log poisson loss: a loss function used for training classifiers.
ImplementsL = exp(c) - z * cwhere c is log(predictions) and z is labels.INDArrayNDLoss. logPoisson(INDArray label, INDArray predictions, INDArray weights, LossReduce lossReduce, boolean full)Log poisson loss: a loss function used for training classifiers.
ImplementsL = exp(c) - z * cwhere c is log(predictions) and z is labels.INDArrayNDNN. logSigmoid(INDArray x)Element-wise sigmoid function: out[i] = log(sigmoid(in[i]))INDArrayNDNN. logSoftmax(INDArray x)Log softmax activationINDArrayNDNN. logSoftmax(INDArray x, int dimension)Log softmax activationINDArrayNDMath. logSumExp(INDArray input, int... dimensions)Log-sum-exp reduction (optionally along dimension).
Computes log(sum(exp(x))INDArrayNDRNN. lstmblock(INDArray maxTSLength, INDArray x, INDArray cLast, INDArray yLast, LSTMWeights LSTMWeights, LSTMConfiguration LSTMConfiguration)The LSTM blockINDArrayNDRNN. lstmblock(INDArray x, LSTMWeights LSTMWeights, LSTMConfiguration LSTMConfiguration)The LSTM blockINDArray[]NDRNN. lstmCell(INDArray x, INDArray cLast, INDArray yLast, LSTMWeights LSTMWeights, LSTMConfiguration LSTMConfiguration)The LSTM cell.INDArray[]NDRNN. lstmLayer(INDArray x, INDArray cLast, INDArray yLast, INDArray maxTSLength, LSTMLayerWeights LSTMLayerWeights, LSTMLayerConfig LSTMLayerConfig)Long Short-Term Memory layer - Hochreiter 1997.
SUPPORTS following data formats:
for unidirectional:
TNS: shapes [timeLength, numExamples, inOutSize]
NST: shapes [numExamples, inOutSize, timeLength]
NTS: shapes [numExamples, timeLength, inOutSize]
for bidirectional:
T2NS: shapes [timeLength, 2, numExamples, inOutSize] (for ONNX)
SUPPORTS following direction modes:
FWD: forward
BWD: backward
BIDIR_SUM: bidirectional sum
BIDIR_CONCAT: bidirectional concat
BIDIR_EXTRA_DIM: bidirectional extra output dim (in conjunction with format dataFormat - T2NS)
You may use different gate configurations:
specify gate/cell/out aplha/beta and numbers of activations for gate/cell/out described in activations enum
("RELU","SIGMOID","AFFINE","LEAKY_RELU","THRESHHOLD_RELU","SCALED_TAHN","HARD_SIGMOID","ELU","SOFTSIGN","SOFTPLUS")
Also this layer supports MKLDNN (DNNL) and cuDNN accelerationINDArray[]NDRNN. lstmLayer(INDArray x, LSTMLayerWeights LSTMLayerWeights, LSTMLayerConfig LSTMLayerConfig)Long Short-Term Memory layer - Hochreiter 1997.
SUPPORTS following data formats:
for unidirectional:
TNS: shapes [timeLength, numExamples, inOutSize]
NST: shapes [numExamples, inOutSize, timeLength]
NTS: shapes [numExamples, timeLength, inOutSize]
for bidirectional:
T2NS: shapes [timeLength, 2, numExamples, inOutSize] (for ONNX)
SUPPORTS following direction modes:
FWD: forward
BWD: backward
BIDIR_SUM: bidirectional sum
BIDIR_CONCAT: bidirectional concat
BIDIR_EXTRA_DIM: bidirectional extra output dim (in conjunction with format dataFormat - T2NS)
You may use different gate configurations:
specify gate/cell/out aplha/beta and numbers of activations for gate/cell/out described in activations enum
("RELU","SIGMOID","AFFINE","LEAKY_RELU","THRESHHOLD_RELU","SCALED_TAHN","HARD_SIGMOID","ELU","SOFTSIGN","SOFTPLUS")
Also this layer supports MKLDNN (DNNL) and cuDNN accelerationINDArrayNDLinalg. lstsq(INDArray matrix, INDArray rhs, double l2_reguralizer)Solver for linear squares problems.INDArrayNDLinalg. lstsq(INDArray matrix, INDArray rhs, double l2_reguralizer, boolean fast)Solver for linear squares problems.INDArrayNDBase. lt(INDArray x, double y)Less than operation: elementwise x < y
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDBase. lt(INDArray x, INDArray y)Less than operation: elementwise x < y
If x and y arrays have equal shape, the output shape is the same as these inputs.
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDBase. lte(INDArray x, double y)Less than or equals operation: elementwise x <= y
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDBase. lte(INDArray x, INDArray y)Less than or equal to operation: elementwise x <= y
If x and y arrays have equal shape, the output shape is the same as these inputs.
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDLinalg. lu(INDArray input)Computes LU decomposition.INDArrayNDMath. manhattanDistance(INDArray x, INDArray y, boolean keepDims, boolean isComplex, int... dimensions)Manhattan distance (l1 norm, l1 distance) reduction operation.INDArrayNDMath. manhattanDistance(INDArray x, INDArray y, int... dimensions)Manhattan distance (l1 norm, l1 distance) reduction operation.INDArrayNDBase. matchCondition(INDArray in, Condition condition)Returns a boolean mask of equal shape to the input, where the condition is satisfied - value 1 where satisfied, 0 otherwiseINDArrayNDBase. matchConditionCount(INDArray in, Condition condition)Returns a count of the number of elements that satisfy the conditionINDArrayNDBase. matchConditionCount(INDArray in, Condition condition, boolean keepDim, int... dimensions)Returns a count of the number of elements that satisfy the condition (for each slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. matchConditionCount(INDArray in, Condition condition, int... dimensions)Returns a count of the number of elements that satisfy the condition (for each slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDLinalg. matmul(INDArray a, INDArray b)Performs matrix mutiplication on input tensors.INDArray[]NDLinalg. matrixBandPart(INDArray input, int minLower, int maxUpper)Copy a tensor setting outside a central band in each innermost matrix.INDArrayNDLinalg. matrixDeterminant(INDArray input)Calculates matrix determinant.INDArrayNDMath. matrixDeterminant(INDArray in)Matrix determinant op.INDArrayNDLinalg. matrixInverse(INDArray input)Inverts a matrixINDArrayNDMath. matrixInverse(INDArray in)Matrix inverse op.INDArrayNDBase. max(INDArray x, boolean keepDims, int... dimensions)Max array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. max(INDArray x, int... dimensions)Max array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. max(INDArray first, INDArray second)Element-wise maximum operation: out[i] = max(first[i], second[i])
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDMath. max(INDArray x, INDArray y)Pairwise max operation, out = max(x, y)
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDCNN. maxPooling2d(INDArray input, Pooling2DConfig Pooling2DConfig)2D Convolution layer operation - max pooling 2dINDArrayNDCNN. maxPooling3d(INDArray input, Pooling3DConfig Pooling3DConfig)3D convolution layer operation - max pooling 3d operation.INDArray[]NDCNN. maxPoolWithArgmax(INDArray input, Pooling2DConfig Pooling2DConfig)2D Convolution layer operation - Max pooling on the input and outputs both max values and indicesINDArrayNDBase. mean(INDArray x, boolean keepDims, int... dimensions)Mean (average) array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. mean(INDArray x, int... dimensions)Mean (average) array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. mean(INDArray x, INDArray dimensions)Mean (average) array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. mean(INDArray x, INDArray dimensions, boolean keepDims)Mean (average) array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. mean(INDArray in, boolean keepDims, int... dimensions)Mean array reduction operation, optionally along specified dimensions: out = mean(abs(x))INDArrayNDMath. mean(INDArray in, int... dimensions)Mean array reduction operation, optionally along specified dimensions: out = mean(abs(x))INDArrayNDMath. mean(INDArray in, INDArray dimensions)Mean array reduction operation, optionally along specified dimensions: out = mean(abs(x))INDArrayNDMath. mean(INDArray in, INDArray dimensions, boolean keepDims)Mean array reduction operation, optionally along specified dimensions: out = mean(abs(x))INDArrayNDLoss. meanPairwiseSquaredError(INDArray label, INDArray predictions, INDArray weights)Mean pairwise squared error.
MPWSE loss calculates the difference between pairs of consecutive elements in the predictions and labels arrays.
For example, if predictions = [p0, p1, p2] and labels are [l0, l1, l2] then MPWSE is:
[((p0-p1) - (l0-l1))^2 + ((p0-p2) - (l0-l2))^2 + ((p1-p2) - (l1-l2))^2] / 3INDArrayNDLoss. meanPairwiseSquaredError(INDArray label, INDArray predictions, INDArray weights, LossReduce lossReduce)Mean pairwise squared error.
MPWSE loss calculates the difference between pairs of consecutive elements in the predictions and labels arrays.
For example, if predictions = [p0, p1, p2] and labels are [l0, l1, l2] then MPWSE is:
[((p0-p1) - (l0-l1))^2 + ((p0-p2) - (l0-l2))^2 + ((p1-p2) - (l1-l2))^2] / 3INDArrayNDLoss. meanSquaredError(INDArray label, INDArray predictions, INDArray weights)Mean squared error loss function.INDArrayNDLoss. meanSquaredError(INDArray label, INDArray predictions, INDArray weights, LossReduce lossReduce)Mean squared error loss function.INDArrayNDBase. merge(INDArray x, INDArray y)The merge operation is a control operation that forwards the either of the inputs to the output, when
the first of them becomes available.INDArrayNDMath. mergeAdd(INDArray... inputs)Merge add function: merges an arbitrary number of equal shaped arrays using element-wise addition:
out = sum_i in[i]INDArrayNDMath. mergeAvg(INDArray... inputs)Merge average function: merges an arbitrary number of equal shaped arrays using element-wise mean operation:
out = mean_i in[i]INDArrayNDMath. mergeMax(INDArray... inputs)Merge max function: merges an arbitrary number of equal shaped arrays using element-wise maximum operation:
out = max_i in[i]INDArrayNDMath. mergeMaxIndex(INDArray... x)Return array of max elements indices with along tensor dimensionsINDArrayNDMath. mergeMaxIndex(INDArray[] x, DataType dataType)Return array of max elements indices with along tensor dimensionsINDArray[]NDMath. meshgrid(INDArray[] inputs, boolean cartesian)Broadcasts parameters for evaluation on an N-D grid.INDArrayNDBase. min(INDArray x, boolean keepDims, int... dimensions)Minimum array reduction operation, optionally along specified dimensions.INDArrayNDBase. min(INDArray x, int... dimensions)Minimum array reduction operation, optionally along specified dimensions.INDArrayNDBase. min(INDArray first, INDArray second)Element-wise minimum operation: out[i] = min(first[i], second[i])
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDMath. min(INDArray x, INDArray y)Pairwise max operation, out = min(x, y)
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDBase. minMax(int datatype, int minOrMax)Return a scalar array reflecting the min or max value for a given data type.INDArrayNDBase. mmul(INDArray x, INDArray y)Matrix multiplication: out = mmul(x,y)
Supports specifying transpose argument to perform operation such as mmul(a^T, b), etc.INDArrayNDBase. mmul(INDArray x, INDArray y, boolean transposeX, boolean transposeY, boolean transposeZ)Matrix multiplication: out = mmul(x,y)
Supports specifying transpose argument to perform operation such as mmul(a^T, b), etc.INDArrayNDLinalg. mmul(INDArray x, INDArray y)Matrix multiplication: out = mmul(x,y)
Supports specifying transpose argument to perform operation such as mmul(a^T, b), etc.INDArrayNDLinalg. mmul(INDArray x, INDArray y, boolean transposeX, boolean transposeY, boolean transposeZ)Matrix multiplication: out = mmul(x,y)
Supports specifying transpose argument to perform operation such as mmul(a^T, b), etc.INDArrayNDMath. mod(INDArray x, INDArray y)Pairwise modulus (remainder) operation, out = x % y
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArray[]NDMath. moments(INDArray input, int[] axes, boolean keepDims)Calculate the mean and (population) variance for the input variable, for the specified axisINDArray[]NDMath. moments(INDArray input, INDArray axes, boolean keepDims)Calculate the mean and (population) variance for the input variable, for the specified axisINDArrayNDMath. mul(INDArray x, double value)Scalar multiplication operation, out = in * scalarINDArrayNDMath. mul(INDArray x, INDArray y)Pairwise multiplication operation, out = x * y
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDNN. multiHeadDotProductAttention(INDArray queries, INDArray keys, INDArray values, INDArray Wq, INDArray Wk, INDArray Wv, INDArray Wo, INDArray mask, boolean scaled)This performs multi-headed dot product attention on the given timeseries input
out = concat(head_1, head_2, ..., head_n) * Wo
head_i = dot_product_attention(Wq_i*q, Wk_i*k, Wv_i*v)
Optionally with normalization when calculating the attention for each head.
See also "Attention is all you need" (https://arxiv.org/abs/1706.03762, pp.INDArrayNDMath. neg(INDArray x)Elementwise negative operation: out = -xINDArrayNDBase. neq(INDArray x, double y)Not equals operation: elementwise x != y
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDBase. neq(INDArray x, INDArray y)Not equal to operation: elementwise x != y
If x and y arrays have equal shape, the output shape is the same as these inputs.
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDImage. nonMaxSuppression(INDArray boxes, INDArray scores, int maxOutSize, double iouThreshold, double scoreThreshold)Greedily selects a subset of bounding boxes in descending order of scoreINDArrayNDBase. norm1(INDArray x, boolean keepDims, int... dimensions)Norm1 (L1 norm) reduction operation: The output contains the L1 norm for each tensor/subset along the specified dimensions:
out = sum_i abs(x[i])
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. norm1(INDArray x, int... dimensions)Norm1 (L1 norm) reduction operation: The output contains the L1 norm for each tensor/subset along the specified dimensions:
out = sum_i abs(x[i])
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. norm1(INDArray in, boolean keepDims, int... dimensions)Mean array reduction operation, optionally along specified dimensions: out = mean(abs(x))INDArrayNDMath. norm1(INDArray in, int... dimensions)Mean array reduction operation, optionally along specified dimensions: out = mean(abs(x))INDArrayNDMath. norm1(INDArray in, INDArray dimensions)Sum of absolute differences.INDArrayNDMath. norm1(INDArray in, INDArray dimensions, boolean keepDims)Sum of absolute differences.INDArrayNDBase. norm2(INDArray x, boolean keepDims, int... dimensions)Norm2 (L2 norm) reduction operation: The output contains the L2 norm for each tensor/subset along the specified dimensions:
out = sqrt(sum_i x[i]^2)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. norm2(INDArray x, int... dimensions)Norm2 (L2 norm) reduction operation: The output contains the L2 norm for each tensor/subset along the specified dimensions:
out = sqrt(sum_i x[i]^2)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. norm2(INDArray in, boolean keepDims, int... dimensions)Euclidean norm: euclidean distance of a vector from the originINDArrayNDMath. norm2(INDArray in, int... dimensions)Euclidean norm: euclidean distance of a vector from the originINDArrayNDMath. norm2(INDArray in, INDArray dimensions)Euclidean norm: euclidean distance of a vector from the originINDArrayNDMath. norm2(INDArray in, INDArray dimensions, boolean keepDims)Euclidean norm: euclidean distance of a vector from the originINDArrayNDRandom. normal(double mean, double stddev, DataType datatype, long... shape)Generate a new random INDArray, where values are randomly sampled according to a Gaussian (normal) distribution,
N(mean, stdev)INDArray[]NDMath. normalizeMoments(INDArray counts, INDArray means, INDArray variances, double shift)Calculate the mean and variance from the sufficient statisticsINDArrayNDRandom. normalTruncated(double mean, double stddev, DataType datatype, long... shape)Generate a new random INDArray, where values are randomly sampled according to a Gaussian (normal) distribution,
N(mean, stdev).INDArrayNDBase. normmax(INDArray x, boolean keepDims, int... dimensions)Max norm (infinity norm) reduction operation: The output contains the max norm for each tensor/subset along the
specified dimensions:
out = max(abs(x[i]))
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. normmax(INDArray x, int... dimensions)Max norm (infinity norm) reduction operation: The output contains the max norm for each tensor/subset along the
specified dimensions:
out = max(abs(x[i]))
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. normMax(INDArray in, boolean keepDims, int... dimensions)Differences between max absolute valueINDArrayNDMath. normMax(INDArray in, int... dimensions)Differences between max absolute valueINDArrayNDMath. normMax(INDArray in, INDArray dimensions)Differences between max absolute valueINDArrayNDMath. normMax(INDArray in, INDArray dimensions, boolean keepDims)Differences between max absolute valueINDArrayNDBase. oneHot(INDArray indices, int depth)Convert the array to a one-hot array with values 0 and 1 for each entry
If input has shape [ a, ..., n] then output has shape [ a, ..., n, depth],
with out[i, ..., j, in[i,...,j]] = 1 with other values being set to 0
see oneHot(SDVariable, int, int, double, double)INDArrayNDBase. oneHot(INDArray indices, int depth, int axis, double on, double off)Convert the array to a one-hot array with values and for each entry
If input has shape [ a, ..., n] then output has shape [ a, ..., n, depth],
with {out[i, ..., j, in[i,...,j]] with other values being set toINDArrayNDBase. oneHot(INDArray indices, int depth, int axis, double on, double off, DataType dataType)Convert the array to a one-hot array with values and for each entry
If input has shape [ a, ..., n] then output has shape [ a, ..., n, depth],
with {out[i, ..., j, in[i,...,j]] with other values being set toINDArrayNDBase. onesLike(INDArray input)Return a variable of all 1s, with the same shape as the input variable.INDArrayNDBase. onesLike(INDArray input, DataType dataType)As per onesLike(String, SDVariable) but the output datatype may be specifiedINDArrayNDBitwise. or(INDArray x, INDArray y)Bitwise OR operation.INDArrayNDMath. or(INDArray x, INDArray y)Boolean OR operation: elementwise (x != 0) || (y != 0)
If x and y arrays have equal shape, the output shape is the same as these inputs.
Note: supports broadcasting if x and y have different shapes and are broadcastable.
Returns an array with values 1 where condition is satisfied, or value 0 otherwise.INDArrayNDImage. pad(INDArray input, INDArray padding, Mode Mode, double padValue)Pads an image according to the given padding typeINDArrayNDNN. pad(INDArray input, INDArray padding, double constant)Padding operationINDArrayNDNN. pad(INDArray input, INDArray padding, PadMode PadMode, double constant)Padding operationINDArrayNDBase. permute(INDArray x, int... dimensions)Array permutation operation: permute the dimensions according to the specified permutation indices.
Example: if input has shape [a,b,c] and dimensions = [2,0,1] the output has shape [c,a,b]INDArrayNDBase. permute(INDArray x, INDArray dimensions)Array permutation operation: permute the dimensions according to the specified permutation indices.
Example: if input has shape [a,b,c] and dimensions = [2,0,1] the output has shape [c,a,b]INDArrayNDMath. pow(INDArray x, double value)Element-wise power function: out = x^valueINDArrayNDMath. pow(INDArray x, INDArray y)Element-wise (broadcastable) power function: out = x[i]^y[i]INDArrayNDNN. preciseGelu(INDArray x)GELU activation function - Gaussian Error Linear Units
For more details, see Gaussian Error Linear Units (GELUs) - https://arxiv.org/abs/1606.08415
This method uses the precise methodINDArrayNDNN. prelu(INDArray input, INDArray alpha, int... sharedAxes)PReLU (Parameterized Rectified Linear Unit) operation.INDArrayNDBase. prod(INDArray x, boolean keepDims, int... dimensions)Product array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. prod(INDArray x, int... dimensions)Product array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. prod(INDArray x, INDArray dimensions)Product array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. prod(INDArray x, INDArray dimensions, boolean keepDims)Product array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. prod(INDArray in, boolean keepDims, int... dimensions)The max of an array along each dimensionINDArrayNDMath. prod(INDArray in, int... dimensions)The max of an array along each dimensionINDArrayNDMath. prod(INDArray in, INDArray dimensions)The product of an array long each dimensionINDArrayNDMath. prod(INDArray in, INDArray dimensions, boolean keepDims)The product of an array long each dimensionINDArray[]NDLinalg. qr(INDArray input)Computes the QR decompositions of input matrix.INDArray[]NDLinalg. qr(INDArray input, boolean full)Computes the QR decompositions of input matrix.INDArrayNDImage. randomCrop(INDArray input, INDArray shape)Randomly crops imageINDArrayNDBase. range(double from, double to, double step, DataType dataType)Create a new variable with a 1d array, where the values start at from and increment by step
up to (but not including) limit.
For example, range(1.0, 3.0, 0.5) will return [1.0, 1.5, 2.0, 2.5]INDArrayNDBase. range(INDArray from, INDArray to, INDArray step, DataType dataType)Create a new variable with a 1d array, where the values start at from and increment by step
up to (but not including) limit.
For example, range(1.0, 3.0, 0.5) will return [1.0, 1.5, 2.0, 2.5]INDArrayNDBase. rank(INDArray in)Returns the rank (number of dimensions, i.e., length(shape)) of the specified INDArray as a 0D scalar variableINDArrayNDMath. rationalTanh(INDArray x)Rational Tanh Approximation elementwise function, as described in the paper:
Compact Convolutional Neural Network Cascade for Face Detection
This is a faster Tanh approximationINDArrayNDMath. rdiv(INDArray x, double value)Scalar reverse division operation, out = scalar / inINDArrayNDMath. rdiv(INDArray x, INDArray y)Pairwise reverse division operation, out = y / x
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDMath. reciprocal(INDArray x)Element-wise reciprocal (inverse) function: out[i] = 1 / in[i]INDArrayNDMath. rectifiedTanh(INDArray x)Rectified tanh operation: max(0, tanh(in))INDArrayNDMath. reduceAMax(INDArray in, boolean keepDims, int... dimensions)Absolute max array reduction operation, optionally along specified dimensions: out = max(abs(x))INDArrayNDMath. reduceAMax(INDArray in, int... dimensions)Absolute max array reduction operation, optionally along specified dimensions: out = max(abs(x))INDArrayNDMath. reduceAMax(INDArray in, INDArray dimensions)Absolute max array reduction operation, optionally along specified dimensions: out = max(abs(x))INDArrayNDMath. reduceAMax(INDArray in, INDArray dimensions, boolean keepDims)Absolute max array reduction operation, optionally along specified dimensions: out = max(abs(x))INDArrayNDMath. reduceAmean(INDArray in, boolean keepDims, int... dimensions)Absolute mean array reduction operation, optionally along specified dimensions: out = mean(abs(x))INDArrayNDMath. reduceAmean(INDArray in, int... dimensions)Absolute mean array reduction operation, optionally along specified dimensions: out = mean(abs(x))INDArrayNDMath. reduceAmean(INDArray in, INDArray dimensions)Absolute mean array reduction operation, optionally along specified dimensions: out = mean(abs(x))INDArrayNDMath. reduceAmean(INDArray in, INDArray dimensions, boolean keepDims)Absolute mean array reduction operation, optionally along specified dimensions: out = mean(abs(x))INDArrayNDMath. reduceAmin(INDArray in, boolean keepDims, int... dimensions)Absolute min array reduction operation, optionally along specified dimensions: out = min(abs(x))INDArrayNDMath. reduceAmin(INDArray in, int... dimensions)Absolute min array reduction operation, optionally along specified dimensions: out = min(abs(x))INDArrayNDMath. reduceAmin(INDArray in, INDArray dimensions)Absolute min array reduction operation, optionally along specified dimensions: out = min(abs(x))INDArrayNDMath. reduceAmin(INDArray in, INDArray dimensions, boolean keepDims)Absolute min array reduction operation, optionally along specified dimensions: out = min(abs(x))INDArrayNDMath. reduceMax(INDArray in, boolean keepDims, int... dimensions)The max of an array along each dimensionINDArrayNDMath. reduceMax(INDArray in, int... dimensions)The max of an array along each dimensionINDArrayNDMath. reduceMax(INDArray in, INDArray dimensions)The max of an array long each dimensionINDArrayNDMath. reduceMax(INDArray in, INDArray dimensions, boolean keepDims)The max of an array long each dimensionINDArrayNDMath. reduceMin(INDArray in, boolean keepDims, int... dimensions)The minimum of an array along each dimensionINDArrayNDMath. reduceMin(INDArray in, int... dimensions)The minimum of an array along each dimensionINDArrayNDMath. reduceMin(INDArray in, INDArray dimensions)The minimum of an array long each dimensionINDArrayNDMath. reduceMin(INDArray in, INDArray dimensions, boolean keepDims)The minimum of an array long each dimensionINDArrayNDNN. relu(INDArray x, double cutoff)Element-wise rectified linear function with specified cutoff:
out[i] = in[i] if in[i] >= cutoff
out[i] = 0 otherwiseINDArrayNDNN. relu6(INDArray x, double cutoff)Element-wise "rectified linear 6" function with specified cutoff:
out[i] = min(max(in, cutoff), 6)INDArrayNDNN. reluLayer(INDArray input, INDArray weights, INDArray bias)ReLU (Rectified Linear Unit) layer operation: out = relu(mmul(in,w) + bias)
Note that bias array is optionalINDArrayNDBase. repeat(INDArray input, INDArray repeats, int axis)A tensor with the shape of input minus the specified axis with elements repeated along the specified axis.INDArrayNDBase. replaceWhere(INDArray update, double value, Condition condition)Element-wise replace where condition:
out[i] = value if condition(update[i]) is satisfied, or
out[i] = update[i] if condition(update[i]) is NOT satisfiedINDArrayNDBase. replaceWhere(INDArray update, INDArray from, Condition condition)Element-wise replace where condition:
out[i] = from[i] if condition(update[i]) is satisfied, or
out[i] = update[i] if condition(update[i]) is NOT satisfiedINDArrayNDBase. reshape(INDArray x, long... shape)Reshape the input variable to the specified (fixed) shape.INDArrayNDBase. reshape(INDArray x, INDArray shape)Reshape the input variable to the specified (fixed) shape.INDArrayNDImage. resizeBiCubic(INDArray input, INDArray size, boolean alignCorners, boolean alignPixelCenters)Resize images to size using the specified method.INDArrayNDImage. resizeBiLinear(INDArray input, int height, int width, boolean alignCorners, boolean halfPixelCenters)Resize images to size using the specified method.INDArrayNDBase. reverse(INDArray x, int... dimensions)Reverse the values of an array for the specified dimensions
If input is:
[ 1, 2, 3]
[ 4, 5, 6]
then
reverse(in, 0):
[3, 2, 1]
[6, 5, 4]
reverse(in, 1):
[4, 5, 6]
[1, 2 3]INDArrayNDBase. reverseSequence(INDArray x, INDArray seq_lengths)Reverse sequence op: for each slice along dimension seqDimension, the first seqLength values are reversedINDArrayNDBase. reverseSequence(INDArray x, INDArray seq_lengths, int seqDim, int batchDim)Reverse sequence op: for each slice along dimension seqDimension, the first seqLength values are reversedINDArrayNDImage. rgbToHsv(INDArray input)Converting array from HSV to RGB formatINDArrayNDImage. rgbToYiq(INDArray input)Converting array from RGB to YIQ formatINDArrayNDImage. rgbToYuv(INDArray input)Converting array from RGB to YUV formatINDArrayNDBitwise. rightShift(INDArray x, INDArray y)Bitwise right shift operation.INDArrayNDBitwise. rightShiftCyclic(INDArray x, INDArray y)Bitwise right cyclical shift operation.INDArrayNDMath. round(INDArray x)Element-wise round function: out = round(x).
Rounds (up or down depending on value) to the nearest integer value.INDArrayNDMath. rsqrt(INDArray x)Element-wise reciprocal (inverse) of square root: out = 1.0 / sqrt(x)INDArrayNDMath. rsub(INDArray x, double value)Scalar reverse subtraction operation, out = scalar - inINDArrayNDMath. rsub(INDArray x, INDArray y)Pairwise reverse subtraction operation, out = y - x
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDBase. scalarFloorMod(INDArray in, double value)Element-wise scalar floor modulus operation: out = floorMod(in, value).
i.e., returns the remainder after division by 'value'INDArrayNDBase. scalarMax(INDArray in, double value)Element-wise scalar maximum operation: out = max(in, value)INDArrayNDBase. scalarMin(INDArray in, double value)Element-wise scalar minimum operation: out = min(in, value)INDArrayNDBase. scalarSet(INDArray in, double set)Return a variable with equal shape to the input, but all elements set to value 'set'INDArrayNDBase. scatterAdd(INDArray ref, INDArray indices, INDArray updates)Scatter addition operation.
If indices is rank 0 (a scalar), then out[index, ...] = out[index, ...] + op(updates[...])
If indices is rank 1 (a vector), then for each position i, out[indices[i], ...] = out[indices[i], ...] + op(updates[i, ...])
If indices is rank 2+, then for each position (i,...,k), out[indices[i], ..., indices[k], ...] = out[indices[i], ..., indices[k], ...] + op(updates[i, ..., k, ...])
Note that if multiple indices refer to the same location, the contributions from each is handled correctly.INDArrayNDBase. scatterDiv(INDArray ref, INDArray indices, INDArray updates)Scatter division operation.
If indices is rank 0 (a scalar), then out[index, ...] = out[index, ...] + op(updates[...])
If indices is rank 1 (a vector), then for each position i, out[indices[i], ...] = out[indices[i], ...] + op(updates[i, ...])
If indices is rank 2+, then for each position (i,...,k), out[indices[i], ..., indices[k], ...] = out[indices[i], ..., indices[k], ...] + op(updates[i, ..., k, ...])
Note that if multiple indices refer to the same location, the contributions from each is handled correctly.INDArrayNDBase. scatterMax(INDArray ref, INDArray indices, INDArray updates)Scatter max operation.
If indices is rank 0 (a scalar), then out[index, ...] = out[index, ...] + op(updates[...])
If indices is rank 1 (a vector), then for each position i, out[indices[i], ...] = out[indices[i], ...] + op(updates[i, ...])
If indices is rank 2+, then for each position (i,...,k), out[indices[i], ..., indices[k], ...] = out[indices[i], ..., indices[k], ...] + op(updates[i, ..., k, ...])
Note that if multiple indices refer to the same location, the contributions from each is handled correctly.INDArrayNDBase. scatterMin(INDArray ref, INDArray indices, INDArray updates)Scatter min operation.
If indices is rank 0 (a scalar), then out[index, ...] = out[index, ...] + op(updates[...])
If indices is rank 1 (a vector), then for each position i, out[indices[i], ...] = out[indices[i], ...] + op(updates[i, ...])
If indices is rank 2+, then for each position (i,...,k), out[indices[i], ..., indices[k], ...] = out[indices[i], ..., indices[k], ...] + op(updates[i, ..., k, ...])
Note that if multiple indices refer to the same location, the contributions from each is handled correctly.INDArrayNDBase. scatterMul(INDArray ref, INDArray indices, INDArray updates)Scatter multiplication operation.
If indices is rank 0 (a scalar), then out[index, ...] = out[index, ...] + op(updates[...])
If indices is rank 1 (a vector), then for each position i, out[indices[i], ...] = out[indices[i], ...] + op(updates[i, ...])
If indices is rank 2+, then for each position (i,...,k), out[indices[i], ..., indices[k], ...] = out[indices[i], ..., indices[k], ...] + op(updates[i, ..., k, ...])
Note that if multiple indices refer to the same location, the contributions from each is handled correctly.INDArrayNDBase. scatterSub(INDArray ref, INDArray indices, INDArray updates)Scatter subtraction operation.
If indices is rank 0 (a scalar), then out[index, ...] = out[index, ...] + op(updates[...])
If indices is rank 1 (a vector), then for each position i, out[indices[i], ...] = out[indices[i], ...] + op(updates[i, ...])
If indices is rank 2+, then for each position (i,...,k), out[indices[i], ..., indices[k], ...] = out[indices[i], ..., indices[k], ...] + op(updates[i, ..., k, ...])
Note that if multiple indices refer to the same location, the contributions from each is handled correctly.INDArrayNDBase. scatterUpdate(INDArray ref, INDArray indices, INDArray updates)Scatter update operation.
If indices is rank 0 (a scalar), then out[index, ...] = out[index, ...] + op(updates[...])
If indices is rank 1 (a vector), then for each position i, out[indices[i], ...] = out[indices[i], ...] + op(updates[i, ...])
If indices is rank 2+, then for each position (i,...,k), out[indices[i], ..., indices[k], ...] = out[indices[i], ..., indices[k], ...] + op(updates[i, ..., k, ...])
Note that if multiple indices refer to the same location, the contributions from each is handled correctly.INDArrayNDBase. segmentMax(INDArray data, INDArray segmentIds)Segment max operation.
If data = [3, 6, 1, 4, 9, 2, 8]
segmentIds = [0, 0, 1, 1, 1, 2, 2]
then output = [6, 9, 8] = [op(3,6), op(1,4,9), op(2,8)]
Note that the segment IDs must be sorted from smallest to largest segment.
See {unsortedSegment (String, SDVariable, SDVariable, int) ops
for the same op without this sorted requirementINDArrayNDBase. segmentMean(INDArray data, INDArray segmentIds)Segment mean operation.
If data = [3, 6, 1, 4, 9, 2, 8]
segmentIds = [0, 0, 1, 1, 1, 2, 2]
then output = [6, 9, 8] = [op(3,6), op(1,4,9), op(2,8)]
Note that the segment IDs must be sorted from smallest to largest segment.
See {unsortedSegment (String, SDVariable, SDVariable, int) ops
for the same op without this sorted requirementINDArrayNDBase. segmentMin(INDArray data, INDArray segmentIds)Segment min operation.
If data = [3, 6, 1, 4, 9, 2, 8]
segmentIds = [0, 0, 1, 1, 1, 2, 2]
then output = [6, 9, 8] = [op(3,6), op(1,4,9), op(2,8)]
Note that the segment IDs must be sorted from smallest to largest segment.
See {unsortedSegment (String, SDVariable, SDVariable, int) ops
for the same op without this sorted requirementINDArrayNDBase. segmentProd(INDArray data, INDArray segmentIds)Segment product operation.
If data = [3, 6, 1, 4, 9, 2, 8]
segmentIds = [0, 0, 1, 1, 1, 2, 2]
then output = [6, 9, 8] = [op(3,6), op(1,4,9), op(2,8)]
Note that the segment IDs must be sorted from smallest to largest segment.
See {unsortedSegment (String, SDVariable, SDVariable, int) ops
for the same op without this sorted requirementINDArrayNDBase. segmentSum(INDArray data, INDArray segmentIds)Segment sum operation.
If data = [3, 6, 1, 4, 9, 2, 8]
segmentIds = [0, 0, 1, 1, 1, 2, 2]
then output = [6, 9, 8] = [op(3,6), op(1,4,9), op(2,8)]
Note that the segment IDs must be sorted from smallest to largest segment.
See {unsortedSegment (String, SDVariable, SDVariable, int) ops
for the same op without this sorted requirementINDArrayNDNN. selu(INDArray x)Element-wise SeLU function - Scaled exponential Lineal Unit: see Self-Normalizing Neural Networks
out[i] = scale * alpha * (exp(in[i])-1) if in[i]>0, or 0 if in[i] <= 0
Uses default scale and alpha values.INDArrayNDCNN. separableConv2d(INDArray layerInput, INDArray depthWeights, INDArray pointWeights, INDArray bias, Conv2DConfig Conv2DConfig)Separable 2D convolution operation with optional biasINDArrayNDCNN. separableConv2d(INDArray layerInput, INDArray depthWeights, INDArray pointWeights, Conv2DConfig Conv2DConfig)Separable 2D convolution operation with optional biasINDArrayNDBase. sequenceMask(INDArray lengths, int maxLen, DataType dataType)Generate a sequence mask (with values 0 or 1) based on the specified lengths
Specifically, out[i, ..., k, j] = (j < lengths[i, ..., k] ? 1.0 : 0.0)INDArrayNDBase. sequenceMask(INDArray lengths, DataType dataType)see sequenceMask(String, SDVariable, SDVariable, DataType)INDArrayNDBase. sequenceMask(INDArray lengths, INDArray maxLen, DataType dataType)Generate a sequence mask (with values 0 or 1) based on the specified lengths
Specifically, out[i, ..., k, j] = (j < lengths[i, ..., k] ? 1.0 : 0.0)INDArrayNDMath. setDiag(INDArray in, INDArray diag)Set the diagonal value to the specified values
If input is
[ a, b, c]
[ d, e, f]
[ g, h, i]
and diag = [ 1, 2, 3] then output is
[ 1, b, c]
[ d, 2, f]
[ g, h, 3]INDArray[]NDBase. setShape(INDArray input, INDArray shape)Sets an inplace shape on the passed in input.INDArrayNDMath. shannonEntropy(INDArray in, boolean keepDims, int... dimensions)Shannon Entropy reduction: -sum(x * log2(x))INDArrayNDMath. shannonEntropy(INDArray in, int... dimensions)Shannon Entropy reduction: -sum(x * log2(x))INDArrayNDMath. shannonEntropy(INDArray in, INDArray dimensions)Shannon Entropy reduction: -sum(x * log2(x))INDArrayNDMath. shannonEntropy(INDArray in, INDArray dimensions, boolean keepDims)Shannon Entropy reduction: -sum(x * log2(x))INDArrayNDBase. shape(INDArray input)Returns the shape of the specified INDArray as a 1D INDArrayINDArrayNDNN. sigmoid(INDArray x)Element-wise sigmoid function: out[i] = 1.0/(1+exp(-in[i]))INDArrayNDLoss. sigmoidCrossEntropy(INDArray label, INDArray predictionLogits, INDArray weights)Sigmoid cross entropy: applies the sigmoid activation function on the input logits (input "pre-sigmoid preductions")
and implements the binary cross entropy loss function.INDArrayNDLoss. sigmoidCrossEntropy(INDArray label, INDArray predictionLogits, INDArray weights, LossReduce lossReduce, double labelSmoothing)Sigmoid cross entropy: applies the sigmoid activation function on the input logits (input "pre-sigmoid preductions")
and implements the binary cross entropy loss function.INDArrayNDNN. sigmoidDerivative(INDArray x, INDArray wrt)Element-wise sigmoid function derivative: dL/dIn given input and dL/dOutINDArrayNDMath. sign(INDArray x)Element-wise sign (signum) function:
out = -1 if in < 0
out = 0 if in = 0
out = 1 if in > 0INDArrayNDMath. sin(INDArray x)Elementwise sine operation: out = sin(x)INDArrayNDMath. sinh(INDArray x)Elementwise sinh (hyperbolic sine) operation: out = sinh(x)INDArrayNDBase. size(INDArray in)Returns the size (number of elements, i.e., prod(shape)) of the specified INDArray as a 0D scalar variableINDArrayNDBase. sizeAt(INDArray in, int dimension)Returns a rank 0 (scalar) variable for the size of the specified dimension.
For example, if X has shape [10,20,30] then sizeAt(X,1)=20.INDArrayNDBase. slice(INDArray input, int[] begin, int... size)Get a subset of the specified input, by specifying the first element and the size of the array.
For example, if input is:
[a, b, c]
[d, e, f]
then slice(input, begin=[0,1], size=[2,1] will return:
[b]
[e]
Note that for each dimension i, begin[i] + size[i] <= input.size(i)INDArrayNDBase. slice(INDArray input, INDArray begin, INDArray size)Get a subset of the specified input, by specifying the first element and the size of the array.
For example, if input is:
[a, b, c]
[d, e, f]
then slice(input, begin=[0,1], size=[2,1] will return:
[b]
[e]
Note that for each dimension i, begin[i] + size[i] <= input.size(i)INDArrayNDNN. softmax(INDArray x)Softmax activation, along the specified dimensionINDArrayNDNN. softmax(INDArray x, int dimension)Softmax activation, along the specified dimensionINDArrayNDLoss. softmaxCrossEntropy(INDArray oneHotLabels, INDArray logitPredictions, INDArray weights)Applies the softmax activation function to the input, then implement multi-class cross entropy:
-sum_classes label[i] * log(p[c])wherep = softmax(logits)
If LossReduce#NONE is used, returned shape is [numExamples] out for [numExamples, numClasses] predicitons/labels;
otherwise, the output is a scalar.INDArrayNDLoss. softmaxCrossEntropy(INDArray oneHotLabels, INDArray logitPredictions, INDArray weights, LossReduce lossReduce, double labelSmoothing)Applies the softmax activation function to the input, then implement multi-class cross entropy:
-sum_classes label[i] * log(p[c])wherep = softmax(logits)
If LossReduce#NONE is used, returned shape is [numExamples] out for [numExamples, numClasses] predicitons/labels;
otherwise, the output is a scalar.INDArrayNDNN. softmaxDerivative(INDArray x, INDArray wrt, int dimension)Softmax derivative functionINDArrayNDNN. softplus(INDArray x)Element-wise softplus function: out = log(exp(x) + 1)INDArrayNDNN. softsign(INDArray x)Element-wise softsign function: out = x / (abs(x) + 1)INDArrayNDNN. softsignDerivative(INDArray x)Element-wise derivative (dOut/dIn) of the softsign function softsign(INDArray)INDArrayNDLinalg. solve(INDArray matrix, INDArray rhs)Solver for systems of linear equations.INDArrayNDLinalg. solve(INDArray matrix, INDArray rhs, boolean adjoint)Solver for systems of linear equations.INDArrayNDCNN. spaceToBatch(INDArray x, int[] blocks, int[] paddingTop, int... paddingBottom)Convolution 2d layer space to batch operation on 4d input.
Increases input batch dimension by rearranging data from spatial dimensions into batch dimensionINDArrayNDCNN. spaceToDepth(INDArray x, int blockSize, DataFormat dataFormat)Convolution 2d layer space to depth operation on 4d input.
Increases input channels (reduced spatial dimensions) by rearranging data into a larger channels dimension
Example: if input has shape [mb, 2, 4, 4] and block size is 2, then output size is [mb, 8/(2*2), 2*2, 2*2]
= [mb, 2, 4, 4]INDArrayNDLoss. sparseSoftmaxCrossEntropy(INDArray logits, INDArray labels)As per softmaxCrossEntropy(String, SDVariable, SDVariable, LossReduce) but the labels variable
is represented as an integer array instead of the equivalent one-hot array.
i.e., if logits are rank N, then labels have rank N-1INDArrayNDBase. sparseToDense(INDArray indices, INDArray shape, INDArray values)Create a dense matrix equivalent of a sparse matrix based on the given input.INDArrayNDBase. sparseToDense(INDArray indices, INDArray shape, INDArray values, INDArray defaultValue)Create a dense matrix equivalent of a sparse matrix based on the given input.INDArray[]NDBase. split(INDArray input, int numSplit, int splitDim)Split a value in to a list of ndarrays.INDArray[]NDBase. split(INDArray input, INDArray numSplit, int splitDim)Split a value in to a list of ndarrays.INDArray[]NDBase. splitV(INDArray input, INDArray sizes, int numSplit, int splitDim)Split a value in to a list of ndarrays with varying sizes
according to the sizes parameter.INDArrayNDMath. sqrt(INDArray x)Element-wise square root function: out = sqrt(x)INDArrayNDMath. square(INDArray x)Element-wise square function: out = x^2INDArrayNDMath. squaredDifference(INDArray x, INDArray y)Pairwise squared difference operation.
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDBase. squaredNorm(INDArray x, boolean keepDims, int... dimensions)Squared L2 norm: see norm2(String, SDVariable, boolean, int...)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. squaredNorm(INDArray x, int... dimensions)Squared L2 norm: see norm2(String, SDVariable, boolean, int...)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. squaredNorm(INDArray in, boolean keepDims, int... dimensions)Sum of squared differences.INDArrayNDMath. squaredNorm(INDArray in, int... dimensions)Sum of squared differences.INDArrayNDMath. squaredNorm(INDArray in, INDArray dimensions)Sum of squared differences.INDArrayNDMath. squaredNorm(INDArray in, INDArray dimensions, boolean keepDims)Sum of squared differences.INDArrayNDBase. squeeze(INDArray x, int axis)Remove a single dimension of size 1.
For example, if input has shape [a,b,1,c] then squeeze(input, 2) returns an array of shape [a,b,c]INDArrayNDRNN. sru(INDArray x, INDArray initialC, INDArray mask, SRUWeights SRUWeights)The SRU layer.INDArrayNDRNN. sru(INDArray x, INDArray initialC, SRUWeights SRUWeights)The SRU layer.INDArrayNDRNN. sruCell(INDArray x, INDArray cLast, SRUWeights SRUWeights)The SRU layer.INDArrayNDBase. stack(int axis, INDArray... values)Stack a set of N INDArray of rank X into one rank X+1 variable.
If inputs have shape [a,b,c] then output has shape:
axis = 0: [N,a,b,c]
axis = 1: [a,N,b,c]
axis = 2: [a,b,N,c]
axis = 3: [a,b,c,N]
see unstack(String[], SDVariable, int, int)INDArrayNDBase. standardDeviation(INDArray x, boolean biasCorrected, boolean keepDims, int... dimensions)Standard deviation array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. standardDeviation(INDArray x, boolean biasCorrected, int... dimensions)Standard deviation array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. standardize(INDArray x, int... dimensions)Standardize input variable along given axisINDArrayNDMath. step(INDArray x, double value)Elementwise step function:
out(x) = 1 if x >= cutoff
out(x) = 0 otherwiseINDArrayNDBase. stridedSlice(INDArray in, long[] begin, long[] end, long... strides)Get a subset of the specified input, by specifying the first element, last element, and the strides.
For example, if input is:
[a, b, c]
[d, e, f]
[g, h, i]
then stridedSlice(input, begin=[0,1], end=[2,2], strides=[2,1], all masks = 0) will return:
[b, c]
[h, i]INDArrayNDBase. stridedSlice(INDArray in, long[] begin, long[] end, long[] strides, int beginMask, int endMask, int ellipsisMask, int newAxisMask, int shrinkAxisMask)Get a subset of the specified input, by specifying the first element, last element, and the strides.
For example, if input is:
[a, b, c]
[d, e, f]
[g, h, i]
then stridedSlice(input, begin=[0,1], end=[2,2], strides=[2,1], all masks = 0) will return:
[b, c]
[h, i]INDArrayNDBase. stridedSlice(INDArray in, INDArray begin, INDArray end, INDArray strides)Get a subset of the specified input, by specifying the first element, last element, and the strides.
For example, if input is:
[a, b, c]
[d, e, f]
[g, h, i]
then stridedSlice(input, begin=[0,1], end=[2,2], strides=[2,1], all masks = 0) will return:
[b, c]
[h, i]INDArrayNDBase. stridedSlice(INDArray in, INDArray begin, INDArray end, INDArray strides, int beginMask, int endMask, int ellipsisMask, int newAxisMask, int shrinkAxisMask)Get a subset of the specified input, by specifying the first element, last element, and the strides.
For example, if input is:
[a, b, c]
[d, e, f]
[g, h, i]
then stridedSlice(input, begin=[0,1], end=[2,2], strides=[2,1], all masks = 0) will return:
[b, c]
[h, i]INDArrayNDMath. sub(INDArray x, double value)Scalar subtraction operation, out = in - scalarINDArrayNDMath. sub(INDArray x, INDArray y)Pairwise subtraction operation, out = x - y
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDBase. sum(INDArray x, boolean keepDims, int... dimensions)Sum array reduction operation, optionally along specified dimensions.
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. sum(INDArray x, int... dimensions)Sum array reduction operation, optionally along specified dimensions.
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. sum(INDArray in, boolean keepDims, int... dimensions)Sum of an array, optionally along specified dimensions: out = sum(x))INDArrayNDMath. sum(INDArray in, int... dimensions)Sum of an array, optionally along specified dimensions: out = sum(x))INDArrayNDMath. sum(INDArray in, INDArray dimensions)Sum of an array, optionally along specified dimensions: out = sum(x))INDArrayNDMath. sum(INDArray in, INDArray dimensions, boolean keepDims)Sum of an array, optionally along specified dimensions: out = sum(x))INDArrayNDLinalg. svd(INDArray input, boolean fullUV, boolean computeUV)Calculates singular value decomposition.INDArrayNDLinalg. svd(INDArray input, boolean fullUV, boolean computeUV, int switchNum)Calculates singular value decomposition.INDArrayNDNN. swish(INDArray x)Element-wise "swish" function: out = x * sigmoid(b*x) with b=1.0
See: https://arxiv.org/abs/1710.05941INDArray[]NDBase. switchOp(INDArray x, INDArray predicate)Switch operation
Predicate - if false, values are output to left (first) branch/output; if true, to right (second) branch/outputINDArrayNDMath. tan(INDArray x)Elementwise tangent operation: out = tan(x)INDArrayNDMath. tanh(INDArray x)Elementwise tanh (hyperbolic tangent) operation: out = tanh(x)INDArrayNDNN. tanh(INDArray x)Elementwise tanh (hyperbolic tangent) operation: out = tanh(x)INDArrayNDBase. tensorMmul(INDArray x, INDArray y, int[] dimensionsX, int... dimensionsY)//TODO: Ops must be documented.INDArrayNDBase. tensorMmul(INDArray x, INDArray y, int[] dimensionsX, int[] dimensionsY, boolean transposeX, boolean transposeY, boolean transposeZ)//TODO: Ops must be documented.INDArrayNDBase. tile(INDArray x, int... repeat)see tile(String, SDVariable, int...)INDArrayNDBase. tile(INDArray x, INDArray repeat)Repeat (tile) the input tensor the specified number of times.
For example, if input is
[1, 2]
[3, 4]
and repeat is [2, 3]
then output is
[1, 2, 1, 2, 1, 2]
[3, 4, 3, 4, 3, 4]
[1, 2, 1, 2, 1, 2]
[3, 4, 3, 4, 3, 4]INDArray[]NDNN. topK(INDArray input, double k, boolean sorted)Find values and indices for the largest k entries along the last dimension.INDArrayNDMath. trace(INDArray in)Matrix trace operation
For rank 2 matrices, the output is a scalar with the trace - i.e., sum of the main diagonal.
For higher rank inputs, output[a,b,c] = trace(in[a,b,c,:,:])INDArrayNDBase. transpose(INDArray x)Matrix transpose operation: If input has shape [a,b] output has shape [b,a]INDArrayNDLinalg. tri(int row, int column)An array with ones at and below the given diagonal and zeros elsewhere.INDArrayNDLinalg. tri(DataType dataType, int row, int column, int diagonal)An array with ones at and below the given diagonal and zeros elsewhere.INDArrayNDLinalg. triangularSolve(INDArray matrix, INDArray rhs, boolean lower, boolean adjoint)Solver for systems of linear questions.INDArrayNDLinalg. triu(INDArray input)Upper triangle of an array.INDArrayNDLinalg. triu(INDArray input, int diag)Upper triangle of an array.INDArrayNDRandom. uniform(double min, double max, DataType datatype, long... shape)Generate a new random INDArray, where values are randomly sampled according to a uniform distribution,
U(min,max)INDArrayNDBase. unsortedSegmentMax(INDArray data, INDArray segmentIds, int numSegments)Unsorted segment max operation.INDArrayNDBase. unsortedSegmentMax(INDArray data, INDArray segmentIds, INDArray numSegments)Unsorted segment max operation.INDArrayNDBase. unsortedSegmentMean(INDArray data, INDArray segmentIds, int numSegments)Unsorted segment mean operation.INDArrayNDBase. unsortedSegmentMean(INDArray data, INDArray segmentIds, INDArray numSegments)Unsorted segment mean operation.INDArrayNDBase. unsortedSegmentMin(INDArray data, INDArray segmentIds, int numSegments)Unsorted segment min operation.INDArrayNDBase. unsortedSegmentMin(INDArray data, INDArray segmentIds, INDArray numSegments)Unsorted segment min operation.INDArrayNDBase. unsortedSegmentProd(INDArray data, INDArray segmentIds, int numSegments)Unsorted segment product operation.INDArrayNDBase. unsortedSegmentProd(INDArray data, INDArray segmentIds, INDArray numSegments)Unsorted segment product operation.INDArrayNDBase. unsortedSegmentSqrtN(INDArray data, INDArray segmentIds, int numSegments)Unsorted segment sqrtN operation.INDArrayNDBase. unsortedSegmentSqrtN(INDArray data, INDArray segmentIds, INDArray numSegments)Unsorted segment sqrtN operation.INDArrayNDBase. unsortedSegmentSum(INDArray data, INDArray segmentIds, int numSegments)Unsorted segment sum operation.INDArrayNDBase. unsortedSegmentSum(INDArray data, INDArray segmentIds, INDArray numSegments)Unsorted segment sum operation.INDArray[]NDBase. unstack(INDArray value, int axis, int num)Unstack a variable of rank X into N rank X-1 variables by taking slices along the specified axis.
If input has shape [a,b,c] then output has shape:
axis = 0: [b,c]
axis = 1: [a,c]
axis = 2: [a,b]INDArrayNDCNN. upsampling2d(INDArray input, int scale)Upsampling layer for 2D inputs.
scale is used for both height and width dimensions.INDArrayNDCNN. upsampling2d(INDArray input, int scaleH, int scaleW, boolean nchw)2D Convolution layer operation - Upsampling 2dINDArrayNDCNN. upsampling3d(INDArray input, boolean ncdhw, int scaleD, int scaleH, int scaleW)3D Convolution layer operation - Upsampling 3dINDArrayNDBase. variance(INDArray x, boolean biasCorrected, boolean keepDims, int... dimensions)Variance array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. variance(INDArray x, boolean biasCorrected, int... dimensions)Variance array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. where(INDArray condition)Returns elements that are true from the given condition array
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. where(INDArray x, INDArray condition)Similar to numpy where, takes elements from x or y depending on whether the condition at a given element is true or false
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. where(INDArray x, INDArray y, INDArray condition)Similar to numpy where, takes elements from x or y depending on whether the condition at a given element is true or false
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. whereNumpy(INDArray x, INDArray y, INDArray condition)As implemented in numpy, Return elements chosen from x or y depending on condition.
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBitwise. xor(INDArray x, INDArray y)Bitwise XOR operation (exclusive OR).INDArrayNDMath. xor(INDArray x, INDArray y)Boolean XOR (exclusive OR) operation: elementwise (x != 0) XOR (y != 0)
If x and y arrays have equal shape, the output shape is the same as these inputs.
Note: supports broadcasting if x and y have different shapes and are broadcastable.
Returns an array with values 1 where condition is satisfied, or value 0 otherwise.INDArrayNDImage. yiqToRgb(INDArray input)Converting image from YIQ to RGB formatINDArrayNDImage. yuvToRgb(INDArray input)Converting image from YUV to RGB formatINDArrayNDMath. zeroFraction(INDArray input)Full array zero fraction array reduction operation, optionally along specified dimensions: out = (count(x == 0) / length(x))INDArrayNDBase. zerosLike(INDArray input)Return a variable of all 0s, with the same shape as the input variable.Methods in org.nd4j.linalg.factory.ops with parameters of type INDArray Modifier and Type Method Description INDArrayNDMath. abs(INDArray x)Elementwise absolute value operation: out = abs(x)INDArrayNDLoss. absoluteDifference(INDArray label, INDArray predictions, INDArray weights)Absolute difference loss:sum_i abs( label[i] - predictions[i] )INDArrayNDLoss. absoluteDifference(INDArray label, INDArray predictions, INDArray weights, LossReduce lossReduce)Absolute difference loss:sum_i abs( label[i] - predictions[i] )INDArrayNDMath. acos(INDArray x)Elementwise acos (arccosine, inverse cosine) operation: out = arccos(x)INDArrayNDMath. acosh(INDArray x)Elementwise acosh (inverse hyperbolic cosine) function: out = acosh(x)INDArrayNDMath. add(INDArray x, double value)Scalar add operation, out = in + scalarINDArrayNDMath. add(INDArray x, INDArray y)Pairwise addition operation, out = x + y
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDImage. adjustContrast(INDArray in, double factor)Adjusts contrast of RGB or grayscale images.INDArrayNDImage. adjustHue(INDArray in, double delta)Adjust hue of RGB imageINDArrayNDImage. adjustSaturation(INDArray in, double factor)Adjust saturation of RGB imagesINDArrayNDBase. all(INDArray x, int... dimensions)Boolean and array reduction operation, optionally along specified dimensionsINDArrayNDBitwise. and(INDArray x, INDArray y)Bitwise AND operation.INDArrayNDMath. and(INDArray x, INDArray y)Boolean AND operation: elementwise (x != 0) && (y != 0)
If x and y arrays have equal shape, the output shape is the same as these inputs.
Note: supports broadcasting if x and y have different shapes and are broadcastable.
Returns an array with values 1 where condition is satisfied, or value 0 otherwise.INDArrayNDBase. any(INDArray x, int... dimensions)Boolean or array reduction operation, optionally along specified dimensionsINDArrayNDBase. argmax(INDArray in, boolean keepDims, int... dimensions)Argmax array reduction operation, optionally along specified dimensions.
Output values are the index of the maximum value of each slice along the specified dimension.
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. argmax(INDArray in, int... dimensions)Argmax array reduction operation, optionally along specified dimensions.
Output values are the index of the maximum value of each slice along the specified dimension.
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. argmin(INDArray in, boolean keepDims, int... dimensions)Argmin array reduction operation, optionally along specified dimensions.
Output values are the index of the minimum value of each slice along the specified dimension.
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. argmin(INDArray in, int... dimensions)Argmin array reduction operation, optionally along specified dimensions.
Output values are the index of the minimum value of each slice along the specified dimension.
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. asin(INDArray x)Elementwise asin (arcsin, inverse sine) operation: out = arcsin(x)INDArrayNDMath. asinh(INDArray x)Elementwise asinh (inverse hyperbolic sine) function: out = asinh(x)INDArrayNDBase. assign(INDArray x, INDArray y)Assign the contents of y to x.
Y must be broadcastable to x or the same shape.INDArrayNDMath. asum(INDArray in, boolean keepDims, int... dimensions)Absolute sum array reduction operation, optionally along specified dimensions: out = sum(abs(x))INDArrayNDMath. asum(INDArray in, int... dimensions)Absolute sum array reduction operation, optionally along specified dimensions: out = sum(abs(x))INDArrayNDMath. atan(INDArray x)Elementwise atan (arctangent, inverse tangent) operation: out = arctangent(x)INDArrayNDMath. atan2(INDArray y, INDArray x)Elementwise atan (arctangent, inverse tangent) operation: out = atan2(x,y).
Similar to atan(y/x) but sigts of x and y are used to determine the location of the resultINDArrayNDMath. atanh(INDArray x)Elementwise atanh (inverse hyperbolic tangent) function: out = atanh(x)INDArrayNDCNN. avgPooling2d(INDArray input, Pooling2DConfig Pooling2DConfig)2D Convolution layer operation - average pooling 2dINDArrayNDCNN. avgPooling3d(INDArray input, Pooling3DConfig Pooling3DConfig)3D convolution layer operation - average pooling 3dINDArray[]NDBase. batchMmul(INDArray[] inputsA, INDArray... inputsB)Matrix multiply a batch of matrices.INDArray[]NDBase. batchMmul(INDArray[] inputsA, INDArray[] inputsB, boolean transposeA, boolean transposeB)Matrix multiply a batch of matrices.INDArrayNDNN. batchNorm(INDArray input, INDArray mean, INDArray variance, INDArray gamma, INDArray beta, double epsilon, int... axis)INDArrayNDCNN. batchToSpace(INDArray x, int[] blocks, int[] croppingTop, int... croppingBottom)Convolution 2d layer batch to space operation on 4d input.
Reduces input batch dimension by rearranging data into a larger spatial dimensionsINDArrayNDNN. biasAdd(INDArray input, INDArray bias, boolean nchw)Bias addition operation: a special case of addition, typically used with CNN 4D activations and a 1D bias vectorINDArrayNDBitwise. bitRotl(INDArray x, INDArray shift)Roll integer bits to the left, i.e.INDArrayNDBitwise. bitRotr(INDArray x, INDArray shift)Roll integer bits to the right, i.e.INDArrayNDBitwise. bitsHammingDistance(INDArray x, INDArray y)Bitwise Hamming distance reduction over all elements of both input arrays.
For example, if x=01100000 and y=1010000 then the bitwise Hamming distance is 2 (due to differences at positions 0 and 1)
Inputs must satisfy the following constraints:
Must be same types: isSameType(x, y)INDArrayNDBitwise. bitShift(INDArray x, INDArray shift)Shift integer bits to the left, i.e.INDArrayNDMath. bitShift(INDArray x, INDArray shift)Bit shift operationINDArrayNDBitwise. bitShiftRight(INDArray x, INDArray shift)Shift integer bits to the right, i.e.INDArrayNDMath. bitShiftRight(INDArray x, INDArray shift)Right bit shift operationINDArrayNDMath. bitShiftRotl(INDArray x, INDArray shift)Cyclic bit shift operationINDArrayNDMath. bitShiftRotr(INDArray x, INDArray shift)Cyclic right shift operationINDArrayNDBase. castTo(INDArray arg, DataType datatype)Cast the array to a new datatype - for example, Integer -> FloatINDArrayNDMath. ceil(INDArray x)Element-wise ceiling function: out = ceil(x).
Rounds each value up to the nearest integer value (if not already an integer)INDArrayNDLinalg. cholesky(INDArray input)Computes the Cholesky decomposition of one or more square matrices.INDArrayNDMath. clipByAvgNorm(INDArray x, double clipValue, int... dimensions)Clips tensor values to a maximum average L2-norm.INDArrayNDBase. clipByNorm(INDArray x, double clipValue)Returns a clipped ndarray such that the input is normalized so that its L2 norm
is <= the specified value.INDArrayNDBase. clipByNorm(INDArray x, INDArray clipValue, INDArray dimensions)Returns a clipped ndarray such that the input is normalized so that its L2 norm
is <= the specified value.INDArrayNDMath. clipByNorm(INDArray x, double clipValue, int... dimensions)Clipping by L2 norm, optionally along dimension(s)
if l2Norm(x,dimension) < clipValue, then input is returned unmodifed
Otherwise, out[i] = in[i] * clipValue / l2Norm(in, dimensions) where each value is clipped according
to the corresponding l2Norm along the specified dimensionsINDArrayNDBase. clipByValue(INDArray x, double clipValueMin, double clipValueMax)Return the clipped ndarray containing values no smaller or larger than the given min and max.INDArrayNDBase. clipByValue(INDArray x, INDArray clipValueMin, INDArray clipValueMax)Return the clipped ndarray containing values no smaller or larger than the given min and max.INDArrayNDMath. clipByValue(INDArray x, double clipValueMin, double clipValueMax)Element-wise clipping function:
out[i] = in[i] if in[i] >= clipValueMin and in[i] <= clipValueMax
out[i] = clipValueMin if in[i] < clipValueMin
out[i] = clipValueMax if in[i] > clipValueMaxINDArrayNDCNN. col2Im(INDArray in, Conv2DConfig Conv2DConfig)col2im operation for use in 2D convolution operations.INDArrayNDBase. concat(int dimension, INDArray... inputs)Concatenate a set of inputs along the specified dimension.
Note that inputs must have identical rank and identical dimensions, other than the dimension to stack on.
For example, if 2 inputs have shape [a, x, c] and [a, y, c] and dimension = 1, then the output has shape [a, x+y, c]
Inputs must satisfy the following constraints:
Input arrays must all be the same datatype: isSameType(inputs)INDArrayNDMath. confusionMatrix(INDArray labels, INDArray pred, int numClasses)Compute the 2d confusion matrix of size [numClasses, numClasses] from a pair of labels and predictions, both of
which are represented as integer values.
For example, if labels = [0, 1, 1], predicted = [0, 2, 1], and numClasses=4 then output is:
[1, 0, 0, 0]
[0, 1, 1, 0]
[0, 0, 0, 0]
[0, 0, 0, 0]INDArrayNDMath. confusionMatrix(INDArray labels, INDArray pred, DataType dataType)Compute the 2d confusion matrix of size [numClasses, numClasses] from a pair of labels and predictions, both of
which are represented as integer values.INDArrayNDMath. confusionMatrix(INDArray labels, INDArray pred, INDArray weights)Compute the 2d confusion matrix of size [numClasses, numClasses] from a pair of labels and predictions, both of
which are represented as integer values.INDArrayNDMath. confusionMatrix(INDArray labels, INDArray pred, INDArray weights, int numClasses)Compute the 2d confusion matrix of size [numClasses, numClasses] from a pair of labels and predictions, both of
which are represented as integer values.
For example, if labels = [0, 1, 1], predicted = [0, 2, 1], numClasses = 4, and weights = [1, 2, 3]
[1, 0, 0, 0]
[0, 3, 2, 0]
[0, 0, 0, 0]
[0, 0, 0, 0]INDArrayNDCNN. conv1d(INDArray input, INDArray weights, INDArray bias, Conv1DConfig Conv1DConfig)Conv1d operation.INDArrayNDCNN. conv1d(INDArray input, INDArray weights, Conv1DConfig Conv1DConfig)Conv1d operation.INDArrayNDCNN. conv2d(INDArray layerInput, INDArray weights, INDArray bias, Conv2DConfig Conv2DConfig)2D Convolution operation with optional biasINDArrayNDCNN. conv2d(INDArray layerInput, INDArray weights, Conv2DConfig Conv2DConfig)2D Convolution operation with optional biasINDArrayNDCNN. conv3d(INDArray input, INDArray weights, INDArray bias, Conv3DConfig Conv3DConfig)Convolution 3D operation with optional biasINDArrayNDCNN. conv3d(INDArray input, INDArray weights, Conv3DConfig Conv3DConfig)Convolution 3D operation with optional biasINDArrayNDMath. cos(INDArray x)Elementwise cosine operation: out = cos(x)INDArrayNDMath. cosh(INDArray x)Elementwise cosh (hyperbolic cosine) operation: out = cosh(x)INDArrayNDLoss. cosineDistance(INDArray label, INDArray predictions, INDArray weights, int dimension)Cosine distance loss:1 - cosineSimilarity(x,y)or1 - sum_i label[i] * prediction[i], which is
equivalent to cosine distance when both the predictions and labels are normalized.
Note: This loss function assumes that both the predictions and labels are normalized to have unit l2 norm.
If this is not the case, you should normalize them first by dividing by norm2(String, SDVariable, boolean, int...)
along the cosine distance dimension (with keepDims=true).INDArrayNDLoss. cosineDistance(INDArray label, INDArray predictions, INDArray weights, LossReduce lossReduce, int dimension)Cosine distance loss:1 - cosineSimilarity(x,y)or1 - sum_i label[i] * prediction[i], which is
equivalent to cosine distance when both the predictions and labels are normalized.
Note: This loss function assumes that both the predictions and labels are normalized to have unit l2 norm.
If this is not the case, you should normalize them first by dividing by norm2(String, SDVariable, boolean, int...)
along the cosine distance dimension (with keepDims=true).INDArrayNDMath. cosineDistance(INDArray x, INDArray y, boolean keepDims, boolean isComplex, int... dimensions)Cosine distance reduction operation.INDArrayNDMath. cosineDistance(INDArray x, INDArray y, int... dimensions)Cosine distance reduction operation.INDArrayNDMath. cosineSimilarity(INDArray x, INDArray y, boolean keepDims, boolean isComplex, int... dimensions)Cosine similarity pairwise reduction operation.INDArrayNDMath. cosineSimilarity(INDArray x, INDArray y, int... dimensions)Cosine similarity pairwise reduction operation.INDArrayNDMath. countNonZero(INDArray in, boolean keepDims, int... dimensions)Count non zero array reduction operation, optionally along specified dimensions: out = count(x != 0)INDArrayNDMath. countNonZero(INDArray in, int... dimensions)Count non zero array reduction operation, optionally along specified dimensions: out = count(x != 0)INDArrayNDMath. countZero(INDArray in, boolean keepDims, int... dimensions)Count zero array reduction operation, optionally along specified dimensions: out = count(x == 0)INDArrayNDMath. countZero(INDArray in, int... dimensions)Count zero array reduction operation, optionally along specified dimensions: out = count(x == 0)INDArrayNDBase. create(INDArray shape, DataType dataType)Return a newly created variable, with the specified shape and data type.INDArrayNDBase. create(INDArray shape, DataType dataType, String order, boolean initialize)Return a newly created variable, with the specified shape and data type.INDArrayNDBase. createView(INDArray input, INDArray... indices)Return a newly created variable, with the specified shape and data type.INDArrayNDNN. cReLU(INDArray x)Concatenates a ReLU which selects only the positive part of the activation with a ReLU which selects only the negative part of the activation.INDArrayNDImage. cropAndResize(INDArray image, INDArray cropBoxes, INDArray boxIndices, INDArray cropOutSize)Given an input image and some crop boxes, extract out the image subsets and resize them to the specified size.INDArrayNDImage. cropAndResize(INDArray image, INDArray cropBoxes, INDArray boxIndices, INDArray cropOutSize, double extrapolationValue)Given an input image and some crop boxes, extract out the image subsets and resize them to the specified size.INDArrayNDLinalg. cross(INDArray a, INDArray b)Computes pairwise cross product.INDArrayNDMath. cross(INDArray a, INDArray b)Returns the pair-wise cross product of equal size arrays a and b: a x b = ||a||x||b|| sin(theta).
Can take rank 1 or above inputs (of equal shapes), but note that the last dimension must have dimension 3INDArrayNDLoss. ctcLoss(INDArray targetLabels, INDArray logitInput, INDArray targetLabelLengths, INDArray logitInputLengths)CTC Loss: Connectionist Temporal Classification Loss.INDArrayNDMath. cube(INDArray x)Element-wise cube function: out = x^3INDArrayNDBase. cumprod(INDArray in, boolean exclusive, boolean reverse, int... axis)Cumulative product operation.
For input: [ a, b, c], output is:
exclusive=false, reverse=false: [a, a*b, a*b*c]
exclusive=true, reverse=false, [0, a, a*b]
exclusive=false, reverse=true: [a*b*c, b*c, c]
exclusive=true, reverse=true: [b*c, c, 0]INDArrayNDBase. cumprod(INDArray in, int... axis)Cumulative product operation.
For input: [ a, b, c], output is:
exclusive=false, reverse=false: [a, a*b, a*b*c]
exclusive=true, reverse=false, [0, a, a*b]
exclusive=false, reverse=true: [a*b*c, b*c, c]
exclusive=true, reverse=true: [b*c, c, 0]INDArrayNDBase. cumsum(INDArray in, boolean exclusive, boolean reverse, int... axis)Cumulative sum operation.
For input: [ a, b, c], output is:
exclusive=false, reverse=false: [a, a+b, a+b+c]
exclusive=true, reverse=false, [0, a, a+b]
exclusive=false, reverse=true: [a+b+c, b+c, c]
exclusive=true, reverse=true: [b+c, c, 0]INDArrayNDBase. cumsum(INDArray in, int... axis)Cumulative sum operation.
For input: [ a, b, c], output is:
exclusive=false, reverse=false: [a, a+b, a+b+c]
exclusive=true, reverse=false, [0, a, a+b]
exclusive=false, reverse=true: [a+b+c, b+c, c]
exclusive=true, reverse=true: [b+c, c, 0]INDArrayNDCNN. deconv2d(INDArray layerInput, INDArray weights, INDArray bias, DeConv2DConfig DeConv2DConfig)2D deconvolution operation with optional biasINDArrayNDCNN. deconv2d(INDArray layerInput, INDArray weights, DeConv2DConfig DeConv2DConfig)2D deconvolution operation with optional biasINDArrayNDCNN. deconv3d(INDArray input, INDArray weights, INDArray bias, DeConv3DConfig DeConv3DConfig)3D CNN deconvolution operation with or without optional biasINDArrayNDCNN. deconv3d(INDArray input, INDArray weights, DeConv3DConfig DeConv3DConfig)3D CNN deconvolution operation with or without optional biasINDArrayNDCNN. depthToSpace(INDArray x, int blockSize, DataFormat dataFormat)Convolution 2d layer batch to space operation on 4d input.
Reduces input channels dimension by rearranging data into a larger spatial dimensions
Example: if input has shape [mb, 8, 2, 2] and block size is 2, then output size is [mb, 8/(2*2), 2*2, 2*2]
= [mb, 2, 4, 4]INDArrayNDCNN. depthWiseConv2d(INDArray layerInput, INDArray depthWeights, INDArray bias, Conv2DConfig Conv2DConfig)Depth-wise 2D convolution operation with optional biasINDArrayNDCNN. depthWiseConv2d(INDArray layerInput, INDArray depthWeights, Conv2DConfig Conv2DConfig)Depth-wise 2D convolution operation with optional biasINDArrayNDLinalg. diag(INDArray input)Calculates diagonal tensor.INDArrayNDMath. diag(INDArray x)Returns an output variable with diagonal values equal to the specified values; off-diagonal values will be set to 0
For example, if input = [1,2,3], then output is given by:
[ 1, 0, 0]
[ 0, 2, 0]
[ 0, 0, 3]
Higher input ranks are also supported: if input has shape [a,...,R-1] then output[i,...,k,i,...,k] = input[i,...,k].
i.e., for input rank R, output has rank 2RINDArrayNDLinalg. diag_part(INDArray input)Calculates diagonal tensor.INDArrayNDMath. diagPart(INDArray x)Extract the diagonal part from the input array.
If input is
[ 1, 0, 0]
[ 0, 2, 0]
[ 0, 0, 3]
then output is [1, 2, 3].
Supports higher dimensions: in general, out[i,...,k] = in[i,...,k,i,...,k]INDArrayNDCNN. dilation2D(INDArray df, INDArray weights, int[] strides, int[] rates, boolean isSameMode)TODO doc stringINDArrayNDMath. div(INDArray x, double value)Scalar division operation, out = in / scalarINDArrayNDMath. div(INDArray x, INDArray y)Pairwise division operation, out = x / y
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDBase. dot(INDArray x, INDArray y, int... dimensions)Pairwise dot product reduction along dimension
output = sum(i=0 ...INDArrayNDNN. dotProductAttention(INDArray queries, INDArray keys, INDArray values, INDArray mask, boolean scaled)This operation performs dot product attention on the given timeseries input with the given queries
out = sum(similarity(k_i, q) * v_i)
similarity(k, q) = softmax(k * q) where x * q is the dot product of x and q
Optionally with normalization step:
similarity(k, q) = softmax(k * q / sqrt(size(q))
See also "Attention is all you need" (https://arxiv.org/abs/1706.03762, p.INDArrayNDNN. dropout(INDArray input, double inputRetainProbability)Dropout operationINDArrayNDNN. dropoutInverted(INDArray input, double p)Dropout inverted operation.INDArray[]NDBase. dynamicPartition(INDArray x, INDArray partitions, int numPartitions)Dynamically partition the input variable values into the specified number of paritions, using the indices.
Example:INDArrayNDBase. dynamicStitch(INDArray[] indices, INDArray... x)Dynamically merge the specified input arrays into a single array, using the specified indicesINDArray[]NDLinalg. eig(INDArray input)Calculates eigen valuesINDArrayNDNN. elu(INDArray x)Element-wise exponential linear unit (ELU) function:
out = x if x > 0
out = a * (exp(x) - 1) if x <= 0
with constant a = 1.0INDArrayNDMath. embeddingLookup(INDArray x, INDArray indices, PartitionMode PartitionMode)Looks up ids in a list of embedding tensors.INDArrayNDMath. entropy(INDArray in, boolean keepDims, int... dimensions)Entropy reduction: -sum(x * log(x))INDArrayNDMath. entropy(INDArray in, int... dimensions)Entropy reduction: -sum(x * log(x))INDArrayNDBase. eq(INDArray x, double y)Equals operation: elementwise x == y
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDBase. eq(INDArray x, INDArray y)Equal to operation: elementwise x == y
If x and y arrays have equal shape, the output shape is the same as these inputs.
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDMath. erf(INDArray x)Element-wise Gaussian error function - out = erf(in)INDArrayNDMath. erfc(INDArray x)Element-wise complementary Gaussian error function - out = erfc(in) = 1 - erf(in)INDArrayNDMath. euclideanDistance(INDArray x, INDArray y, boolean keepDims, boolean isComplex, int... dimensions)Euclidean distance (l2 norm, l2 distance) reduction operation.INDArrayNDMath. euclideanDistance(INDArray x, INDArray y, int... dimensions)Euclidean distance (l2 norm, l2 distance) reduction operation.INDArrayNDMath. exp(INDArray x)Elementwise exponent function: out = exp(x) = 2.71828...^xINDArrayNDBase. expandDims(INDArray x, int axis)Reshape the input by adding a 1 at the specified location.
For example, if input has shape [a, b], then output shape is:
axis = 0: [1, a, b]
axis = 1: [a, 1, b]
axis = 2: [a, b, 1]INDArrayNDMath. expm1(INDArray x)Elementwise 1.0 - exponent function: out = 1.0 - exp(x) = 1.0 - 2.71828...^xINDArrayNDCNN. extractImagePatches(INDArray input, int kH, int kW, int sH, int sW, int rH, int rW, boolean sameMode)Extract image patchesINDArrayNDImage. extractImagePatches(INDArray image, int[] kSizes, int[] strides, int[] rates, boolean sameMode)Given an input image, extract out image patches (of size kSizes - h x w) and place them in the depth dimension.INDArrayNDMath. eye(INDArray rows)As per eye(String, int) but with the number of rows specified as a scalar INDArrayINDArrayNDMath. eye(INDArray rows, INDArray cols)As per eye(int, int) bit with the number of rows/columns specified as scalar INDArraysINDArrayNDBase. fill(INDArray shape, DataType dataType, double value)Generate an output variable with the specified (dynamic) shape with all elements set to the specified valueINDArrayNDMath. firstIndex(INDArray in, Condition condition, boolean keepDims, int... dimensions)First index reduction operation.
Returns a variable that contains the index of the first element that matches the specified condition (for each
slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. firstIndex(INDArray in, Condition condition, int... dimensions)First index reduction operation.
Returns a variable that contains the index of the first element that matches the specified condition (for each
slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. flatten(INDArray... inputs)Return a flattened variable with the specified orderingINDArrayNDBase. flatten(INDArray[] inputs, String order)Return a flattened variable with the specified orderingINDArrayNDMath. floor(INDArray x)Element-wise floor function: out = floor(x).
Rounds each value down to the nearest integer value (if not already an integer)INDArrayNDMath. floorDiv(INDArray x, INDArray y)Pairwise floor division operation, out = floor(x / y)
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDMath. floorMod(INDArray x, double value)Scalar floor modulus operationINDArrayNDMath. floorMod(INDArray x, INDArray y)Pairwise Modulus division operation
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDBase. gather(INDArray df, int[] indices, int axis)Gather slices from the input variable where the indices are specified as fixed int[] values.
Output shape is same as input shape, except for axis dimension, which has size equal to indices.length.INDArrayNDBase. gather(INDArray df, INDArray indices, int axis)Gather slices from the input variable where the indices are specified as dynamic array values.
Output shape is same as input shape, except for axis dimension, which has size equal to indices.length.INDArrayNDBase. gatherNd(INDArray df, INDArray indices)Gather slices from df with shape specified by indices.INDArrayNDNN. gelu(INDArray x)GELU activation function - Gaussian Error Linear Units
For more details, see Gaussian Error Linear Units (GELUs) - https://arxiv.org/abs/1606.08415
This method uses the sigmoid approximationINDArrayNDRNN. gru(INDArray x, INDArray hLast, INDArray Wx, INDArray Wh, INDArray biases)The GRU operation.INDArray[]NDRNN. gruCell(INDArray x, INDArray hLast, GRUWeights GRUWeights)The GRU cell.INDArrayNDBase. gt(INDArray x, double y)Greater than operation: elementwise x > y
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDBase. gt(INDArray x, INDArray y)Greater than operation: elementwise x > y
If x and y arrays have equal shape, the output shape is the same as these inputs.
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDBase. gte(INDArray x, double y)Greater than or equals operation: elementwise x >= y
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDBase. gte(INDArray x, INDArray y)Greater than or equal to operation: elementwise x >= y
If x and y arrays have equal shape, the output shape is the same as these inputs.
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDMath. hammingDistance(INDArray x, INDArray y, boolean keepDims, boolean isComplex, int... dimensions)Hamming distance reduction operation.INDArrayNDMath. hammingDistance(INDArray x, INDArray y, int... dimensions)Hamming distance reduction operation.INDArrayNDNN. hardSigmoid(INDArray x)Element-wise hard sigmoid function:
out[i] = 0 if in[i] <= -2.5
out[1] = 0.2*in[i]+0.5 if -2.5 < in[i] < 2.5
out[i] = 1 if in[i] >= 2.5INDArrayNDNN. hardTanh(INDArray x)Element-wise hard tanh function:
out[i] = -1 if in[i] <= -1
out[1] = in[i] if -1 < in[i] < 1
out[i] = 1 if in[i] >= 1INDArrayNDNN. hardTanhDerivative(INDArray x)Derivative (dOut/dIn) of the element-wise hard Tanh function - hardTanh(INDArray)INDArrayNDLoss. hingeLoss(INDArray label, INDArray predictions, INDArray weights)Hinge loss: a loss function used for training classifiers.
ImplementsL = max(0, 1 - t * predictions)where t is the label values after internally converting to {-1,1}
from the user specified {0,1}.INDArrayNDLoss. hingeLoss(INDArray label, INDArray predictions, INDArray weights, LossReduce lossReduce)Hinge loss: a loss function used for training classifiers.
ImplementsL = max(0, 1 - t * predictions)where t is the label values after internally converting to {-1,1}
from the user specified {0,1}.INDArrayNDImage. hsvToRgb(INDArray input)Converting image from HSV to RGB formatINDArrayNDLoss. huberLoss(INDArray label, INDArray predictions, INDArray weights, double delta)Huber loss function, used for robust regression.INDArrayNDLoss. huberLoss(INDArray label, INDArray predictions, INDArray weights, LossReduce lossReduce, double delta)Huber loss function, used for robust regression.INDArrayNDMath. iamax(INDArray in, boolean keepDims, int... dimensions)Index of the max absolute value: argmax(abs(in))
see argmax(String, INDArray, boolean, int...)INDArrayNDMath. iamax(INDArray in, int... dimensions)Index of the max absolute value: argmax(abs(in))
see argmax(String, INDArray, boolean, int...)INDArrayNDMath. iamin(INDArray in, boolean keepDims, int... dimensions)Index of the min absolute value: argmin(abs(in))
see argmin(String, INDArray, boolean, int...)INDArrayNDMath. iamin(INDArray in, int... dimensions)Index of the min absolute value: argmin(abs(in))
see argmin(String, INDArray, boolean, int...)INDArrayNDBase. identity(INDArray input)Elementwise identity operation: out = xINDArrayNDCNN. im2Col(INDArray in, Conv2DConfig Conv2DConfig)im2col operation for use in 2D convolution operations.INDArrayNDImage. imageResize(INDArray input, INDArray size, boolean preserveAspectRatio, boolean antialias, ImageResizeMethod ImageResizeMethod)Resize images to size using the specified method.INDArrayNDImage. imageResize(INDArray input, INDArray size, ImageResizeMethod ImageResizeMethod)Resize images to size using the specified method.INDArrayNDBase. invertPermutation(INDArray input)Compute the inverse permutation indices for a permutation operation
Example: if input is [2, 0, 1] then output is [1, 2, 0]
The idea is that x.permute(input).permute(invertPermutation(input)) == xINDArrayNDMath. isFinite(INDArray x)Is finite operation: elementwise isFinite(x)
Returns an array with the same shape/size as the input, with values 1 where condition is satisfied, or
value 0 otherwiseINDArrayNDMath. isInfinite(INDArray x)Is infinite operation: elementwise isInfinite(x)
Returns an array with the same shape/size as the input, with values 1 where condition is satisfied, or
value 0 otherwiseINDArrayNDMath. isMax(INDArray x)Is maximum operation: elementwise x == max(x)
Returns an array with the same shape/size as the input, with values 1 where condition is satisfied, or
value 0 otherwiseINDArrayNDMath. isNaN(INDArray x)Is Not a Number operation: elementwise isNaN(x)
Returns an array with the same shape/size as the input, with values 1 where condition is satisfied, or
value 0 otherwiseINDArrayNDMath. isNonDecreasing(INDArray x)Is the array non decreasing?
An array is non-decreasing if for every valid i, x[i] <= x[i+1].INDArrayNDBase. isNumericTensor(INDArray x)Is the director a numeric tensor? In the current version of ND4J/SameDiff, this always returns true/1INDArrayNDMath. isStrictlyIncreasing(INDArray x)Is the array strictly increasing?
An array is strictly increasing if for every valid i, x[i] < x[i+1].INDArrayNDMath. jaccardDistance(INDArray x, INDArray y, boolean keepDims, boolean isComplex, int... dimensions)Jaccard similarity reduction operation.INDArrayNDMath. jaccardDistance(INDArray x, INDArray y, int... dimensions)Jaccard similarity reduction operation.INDArrayNDLoss. l2Loss(INDArray var)L2 loss: 1/2 * sum(x^2)INDArrayNDMath. lastIndex(INDArray in, Condition condition, boolean keepDims, int... dimensions)Last index reduction operation.
Returns a variable that contains the index of the last element that matches the specified condition (for each
slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. lastIndex(INDArray in, Condition condition, int... dimensions)Last index reduction operation.
Returns a variable that contains the index of the last element that matches the specified condition (for each
slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDNN. layerNorm(INDArray input, INDArray gain, boolean channelsFirst, int... dimensions)Apply Layer Normalization
y = gain * standardize(x) + biasINDArrayNDNN. layerNorm(INDArray input, INDArray gain, INDArray bias, boolean channelsFirst, int... dimensions)Apply Layer Normalization
y = gain * standardize(x) + biasINDArrayNDNN. leakyRelu(INDArray x, double alpha)Element-wise leaky ReLU function:
out = x if x >= 0.0
out = alpha * x if x < cutoff
Alpha value is most commonly set to 0.01INDArrayNDNN. leakyReluDerivative(INDArray x, double alpha)Leaky ReLU derivative: dOut/dIn given input.INDArrayNDBitwise. leftShift(INDArray x, INDArray y)Bitwise left shift operation.INDArrayNDBitwise. leftShiftCyclic(INDArray x, INDArray y)Bitwise left cyclical shift operation.INDArrayNDNN. linear(INDArray input, INDArray weights, INDArray bias)Linear layer operation: out = mmul(in,w) + bias
Note that bias array is optionalINDArrayNDBase. linspace(INDArray start, INDArray stop, INDArray number, DataType dataType)Create a new 1d array with values evenly spaced between values 'start' and 'stop'
For example, linspace(start=3.0, stop=4.0, number=3) will generate [3.0, 3.5, 4.0]INDArray[]NDMath. listDiff(INDArray x, INDArray y)Calculates difference between inputs X and Y.INDArrayNDCNN. localResponseNormalization(INDArray input, LocalResponseNormalizationConfig LocalResponseNormalizationConfig)2D convolution layer operation - local response normalizationINDArrayNDMath. log(INDArray x)Element-wise logarithm function (base e - natural logarithm): out = log(x)INDArrayNDMath. log(INDArray x, double base)Element-wise logarithm function (with specified base): out = log_{base}(x)INDArrayNDMath. log1p(INDArray x)Elementwise natural logarithm function: out = log_e (1 + x)INDArrayNDLinalg. logdet(INDArray input)Calculates log of determinant.INDArrayNDMath. logEntropy(INDArray in, boolean keepDims, int... dimensions)Log entropy reduction: log(-sum(x * log(x)))INDArrayNDMath. logEntropy(INDArray in, int... dimensions)Log entropy reduction: log(-sum(x * log(x)))INDArrayNDLoss. logLoss(INDArray label, INDArray predictions)Log loss, i.e., binary cross entropy loss, usually used for binary multi-label classification.INDArrayNDLoss. logLoss(INDArray label, INDArray predictions, INDArray weights, LossReduce lossReduce, double epsilon)Log loss, i.e., binary cross entropy loss, usually used for binary multi-label classification.INDArrayNDLoss. logPoisson(INDArray label, INDArray predictions, INDArray weights, boolean full)Log poisson loss: a loss function used for training classifiers.
ImplementsL = exp(c) - z * cwhere c is log(predictions) and z is labels.INDArrayNDLoss. logPoisson(INDArray label, INDArray predictions, INDArray weights, LossReduce lossReduce, boolean full)Log poisson loss: a loss function used for training classifiers.
ImplementsL = exp(c) - z * cwhere c is log(predictions) and z is labels.INDArrayNDNN. logSigmoid(INDArray x)Element-wise sigmoid function: out[i] = log(sigmoid(in[i]))INDArrayNDNN. logSoftmax(INDArray x)Log softmax activationINDArrayNDNN. logSoftmax(INDArray x, int dimension)Log softmax activationINDArrayNDMath. logSumExp(INDArray input, int... dimensions)Log-sum-exp reduction (optionally along dimension).
Computes log(sum(exp(x))INDArrayNDRNN. lstmblock(INDArray maxTSLength, INDArray x, INDArray cLast, INDArray yLast, LSTMWeights LSTMWeights, LSTMConfiguration LSTMConfiguration)The LSTM blockINDArrayNDRNN. lstmblock(INDArray x, LSTMWeights LSTMWeights, LSTMConfiguration LSTMConfiguration)The LSTM blockINDArray[]NDRNN. lstmCell(INDArray x, INDArray cLast, INDArray yLast, LSTMWeights LSTMWeights, LSTMConfiguration LSTMConfiguration)The LSTM cell.INDArray[]NDRNN. lstmLayer(INDArray x, INDArray cLast, INDArray yLast, INDArray maxTSLength, LSTMLayerWeights LSTMLayerWeights, LSTMLayerConfig LSTMLayerConfig)Long Short-Term Memory layer - Hochreiter 1997.
SUPPORTS following data formats:
for unidirectional:
TNS: shapes [timeLength, numExamples, inOutSize]
NST: shapes [numExamples, inOutSize, timeLength]
NTS: shapes [numExamples, timeLength, inOutSize]
for bidirectional:
T2NS: shapes [timeLength, 2, numExamples, inOutSize] (for ONNX)
SUPPORTS following direction modes:
FWD: forward
BWD: backward
BIDIR_SUM: bidirectional sum
BIDIR_CONCAT: bidirectional concat
BIDIR_EXTRA_DIM: bidirectional extra output dim (in conjunction with format dataFormat - T2NS)
You may use different gate configurations:
specify gate/cell/out aplha/beta and numbers of activations for gate/cell/out described in activations enum
("RELU","SIGMOID","AFFINE","LEAKY_RELU","THRESHHOLD_RELU","SCALED_TAHN","HARD_SIGMOID","ELU","SOFTSIGN","SOFTPLUS")
Also this layer supports MKLDNN (DNNL) and cuDNN accelerationINDArray[]NDRNN. lstmLayer(INDArray x, LSTMLayerWeights LSTMLayerWeights, LSTMLayerConfig LSTMLayerConfig)Long Short-Term Memory layer - Hochreiter 1997.
SUPPORTS following data formats:
for unidirectional:
TNS: shapes [timeLength, numExamples, inOutSize]
NST: shapes [numExamples, inOutSize, timeLength]
NTS: shapes [numExamples, timeLength, inOutSize]
for bidirectional:
T2NS: shapes [timeLength, 2, numExamples, inOutSize] (for ONNX)
SUPPORTS following direction modes:
FWD: forward
BWD: backward
BIDIR_SUM: bidirectional sum
BIDIR_CONCAT: bidirectional concat
BIDIR_EXTRA_DIM: bidirectional extra output dim (in conjunction with format dataFormat - T2NS)
You may use different gate configurations:
specify gate/cell/out aplha/beta and numbers of activations for gate/cell/out described in activations enum
("RELU","SIGMOID","AFFINE","LEAKY_RELU","THRESHHOLD_RELU","SCALED_TAHN","HARD_SIGMOID","ELU","SOFTSIGN","SOFTPLUS")
Also this layer supports MKLDNN (DNNL) and cuDNN accelerationINDArrayNDLinalg. lstsq(INDArray matrix, INDArray rhs, double l2_reguralizer)Solver for linear squares problems.INDArrayNDLinalg. lstsq(INDArray matrix, INDArray rhs, double l2_reguralizer, boolean fast)Solver for linear squares problems.INDArrayNDBase. lt(INDArray x, double y)Less than operation: elementwise x < y
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDBase. lt(INDArray x, INDArray y)Less than operation: elementwise x < y
If x and y arrays have equal shape, the output shape is the same as these inputs.
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDBase. lte(INDArray x, double y)Less than or equals operation: elementwise x <= y
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDBase. lte(INDArray x, INDArray y)Less than or equal to operation: elementwise x <= y
If x and y arrays have equal shape, the output shape is the same as these inputs.
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDLinalg. lu(INDArray input)Computes LU decomposition.INDArrayNDMath. manhattanDistance(INDArray x, INDArray y, boolean keepDims, boolean isComplex, int... dimensions)Manhattan distance (l1 norm, l1 distance) reduction operation.INDArrayNDMath. manhattanDistance(INDArray x, INDArray y, int... dimensions)Manhattan distance (l1 norm, l1 distance) reduction operation.INDArrayNDBase. matchCondition(INDArray in, Condition condition)Returns a boolean mask of equal shape to the input, where the condition is satisfied - value 1 where satisfied, 0 otherwiseINDArrayNDBase. matchConditionCount(INDArray in, Condition condition)Returns a count of the number of elements that satisfy the conditionINDArrayNDBase. matchConditionCount(INDArray in, Condition condition, boolean keepDim, int... dimensions)Returns a count of the number of elements that satisfy the condition (for each slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. matchConditionCount(INDArray in, Condition condition, int... dimensions)Returns a count of the number of elements that satisfy the condition (for each slice along the specified dimensions)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDLinalg. matmul(INDArray a, INDArray b)Performs matrix mutiplication on input tensors.INDArray[]NDLinalg. matrixBandPart(INDArray input, int minLower, int maxUpper)Copy a tensor setting outside a central band in each innermost matrix.INDArrayNDLinalg. matrixDeterminant(INDArray input)Calculates matrix determinant.INDArrayNDMath. matrixDeterminant(INDArray in)Matrix determinant op.INDArrayNDLinalg. matrixInverse(INDArray input)Inverts a matrixINDArrayNDMath. matrixInverse(INDArray in)Matrix inverse op.INDArrayNDBase. max(INDArray x, boolean keepDims, int... dimensions)Max array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. max(INDArray x, int... dimensions)Max array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. max(INDArray first, INDArray second)Element-wise maximum operation: out[i] = max(first[i], second[i])
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDMath. max(INDArray x, INDArray y)Pairwise max operation, out = max(x, y)
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDCNN. maxPooling2d(INDArray input, Pooling2DConfig Pooling2DConfig)2D Convolution layer operation - max pooling 2dINDArrayNDCNN. maxPooling3d(INDArray input, Pooling3DConfig Pooling3DConfig)3D convolution layer operation - max pooling 3d operation.INDArray[]NDCNN. maxPoolWithArgmax(INDArray input, Pooling2DConfig Pooling2DConfig)2D Convolution layer operation - Max pooling on the input and outputs both max values and indicesINDArrayNDBase. mean(INDArray x, boolean keepDims, int... dimensions)Mean (average) array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. mean(INDArray x, int... dimensions)Mean (average) array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. mean(INDArray x, INDArray dimensions)Mean (average) array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. mean(INDArray x, INDArray dimensions, boolean keepDims)Mean (average) array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. mean(INDArray in, boolean keepDims, int... dimensions)Mean array reduction operation, optionally along specified dimensions: out = mean(abs(x))INDArrayNDMath. mean(INDArray in, int... dimensions)Mean array reduction operation, optionally along specified dimensions: out = mean(abs(x))INDArrayNDMath. mean(INDArray in, INDArray dimensions)Mean array reduction operation, optionally along specified dimensions: out = mean(abs(x))INDArrayNDMath. mean(INDArray in, INDArray dimensions, boolean keepDims)Mean array reduction operation, optionally along specified dimensions: out = mean(abs(x))INDArrayNDLoss. meanPairwiseSquaredError(INDArray label, INDArray predictions, INDArray weights)Mean pairwise squared error.
MPWSE loss calculates the difference between pairs of consecutive elements in the predictions and labels arrays.
For example, if predictions = [p0, p1, p2] and labels are [l0, l1, l2] then MPWSE is:
[((p0-p1) - (l0-l1))^2 + ((p0-p2) - (l0-l2))^2 + ((p1-p2) - (l1-l2))^2] / 3INDArrayNDLoss. meanPairwiseSquaredError(INDArray label, INDArray predictions, INDArray weights, LossReduce lossReduce)Mean pairwise squared error.
MPWSE loss calculates the difference between pairs of consecutive elements in the predictions and labels arrays.
For example, if predictions = [p0, p1, p2] and labels are [l0, l1, l2] then MPWSE is:
[((p0-p1) - (l0-l1))^2 + ((p0-p2) - (l0-l2))^2 + ((p1-p2) - (l1-l2))^2] / 3INDArrayNDLoss. meanSquaredError(INDArray label, INDArray predictions, INDArray weights)Mean squared error loss function.INDArrayNDLoss. meanSquaredError(INDArray label, INDArray predictions, INDArray weights, LossReduce lossReduce)Mean squared error loss function.INDArrayNDBase. merge(INDArray x, INDArray y)The merge operation is a control operation that forwards the either of the inputs to the output, when
the first of them becomes available.INDArrayNDMath. mergeAdd(INDArray... inputs)Merge add function: merges an arbitrary number of equal shaped arrays using element-wise addition:
out = sum_i in[i]INDArrayNDMath. mergeAvg(INDArray... inputs)Merge average function: merges an arbitrary number of equal shaped arrays using element-wise mean operation:
out = mean_i in[i]INDArrayNDMath. mergeMax(INDArray... inputs)Merge max function: merges an arbitrary number of equal shaped arrays using element-wise maximum operation:
out = max_i in[i]INDArrayNDMath. mergeMaxIndex(INDArray... x)Return array of max elements indices with along tensor dimensionsINDArrayNDMath. mergeMaxIndex(INDArray[] x, DataType dataType)Return array of max elements indices with along tensor dimensionsINDArray[]NDMath. meshgrid(INDArray[] inputs, boolean cartesian)Broadcasts parameters for evaluation on an N-D grid.INDArrayNDBase. min(INDArray x, boolean keepDims, int... dimensions)Minimum array reduction operation, optionally along specified dimensions.INDArrayNDBase. min(INDArray x, int... dimensions)Minimum array reduction operation, optionally along specified dimensions.INDArrayNDBase. min(INDArray first, INDArray second)Element-wise minimum operation: out[i] = min(first[i], second[i])
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDMath. min(INDArray x, INDArray y)Pairwise max operation, out = min(x, y)
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDBase. mmul(INDArray x, INDArray y)Matrix multiplication: out = mmul(x,y)
Supports specifying transpose argument to perform operation such as mmul(a^T, b), etc.INDArrayNDBase. mmul(INDArray x, INDArray y, boolean transposeX, boolean transposeY, boolean transposeZ)Matrix multiplication: out = mmul(x,y)
Supports specifying transpose argument to perform operation such as mmul(a^T, b), etc.INDArrayNDLinalg. mmul(INDArray x, INDArray y)Matrix multiplication: out = mmul(x,y)
Supports specifying transpose argument to perform operation such as mmul(a^T, b), etc.INDArrayNDLinalg. mmul(INDArray x, INDArray y, boolean transposeX, boolean transposeY, boolean transposeZ)Matrix multiplication: out = mmul(x,y)
Supports specifying transpose argument to perform operation such as mmul(a^T, b), etc.INDArrayNDMath. mod(INDArray x, INDArray y)Pairwise modulus (remainder) operation, out = x % y
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArray[]NDMath. moments(INDArray input, int[] axes, boolean keepDims)Calculate the mean and (population) variance for the input variable, for the specified axisINDArray[]NDMath. moments(INDArray input, INDArray axes, boolean keepDims)Calculate the mean and (population) variance for the input variable, for the specified axisINDArrayNDMath. mul(INDArray x, double value)Scalar multiplication operation, out = in * scalarINDArrayNDMath. mul(INDArray x, INDArray y)Pairwise multiplication operation, out = x * y
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDNN. multiHeadDotProductAttention(INDArray queries, INDArray keys, INDArray values, INDArray Wq, INDArray Wk, INDArray Wv, INDArray Wo, INDArray mask, boolean scaled)This performs multi-headed dot product attention on the given timeseries input
out = concat(head_1, head_2, ..., head_n) * Wo
head_i = dot_product_attention(Wq_i*q, Wk_i*k, Wv_i*v)
Optionally with normalization when calculating the attention for each head.
See also "Attention is all you need" (https://arxiv.org/abs/1706.03762, pp.INDArrayNDMath. neg(INDArray x)Elementwise negative operation: out = -xINDArrayNDBase. neq(INDArray x, double y)Not equals operation: elementwise x != y
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDBase. neq(INDArray x, INDArray y)Not equal to operation: elementwise x != y
If x and y arrays have equal shape, the output shape is the same as these inputs.
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html
Return boolean array with values true where satisfied, or false otherwise.INDArrayNDImage. nonMaxSuppression(INDArray boxes, INDArray scores, int maxOutSize, double iouThreshold, double scoreThreshold)Greedily selects a subset of bounding boxes in descending order of scoreINDArrayNDBase. norm1(INDArray x, boolean keepDims, int... dimensions)Norm1 (L1 norm) reduction operation: The output contains the L1 norm for each tensor/subset along the specified dimensions:
out = sum_i abs(x[i])
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. norm1(INDArray x, int... dimensions)Norm1 (L1 norm) reduction operation: The output contains the L1 norm for each tensor/subset along the specified dimensions:
out = sum_i abs(x[i])
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. norm1(INDArray in, boolean keepDims, int... dimensions)Mean array reduction operation, optionally along specified dimensions: out = mean(abs(x))INDArrayNDMath. norm1(INDArray in, int... dimensions)Mean array reduction operation, optionally along specified dimensions: out = mean(abs(x))INDArrayNDMath. norm1(INDArray in, INDArray dimensions)Sum of absolute differences.INDArrayNDMath. norm1(INDArray in, INDArray dimensions, boolean keepDims)Sum of absolute differences.INDArrayNDBase. norm2(INDArray x, boolean keepDims, int... dimensions)Norm2 (L2 norm) reduction operation: The output contains the L2 norm for each tensor/subset along the specified dimensions:
out = sqrt(sum_i x[i]^2)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. norm2(INDArray x, int... dimensions)Norm2 (L2 norm) reduction operation: The output contains the L2 norm for each tensor/subset along the specified dimensions:
out = sqrt(sum_i x[i]^2)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. norm2(INDArray in, boolean keepDims, int... dimensions)Euclidean norm: euclidean distance of a vector from the originINDArrayNDMath. norm2(INDArray in, int... dimensions)Euclidean norm: euclidean distance of a vector from the originINDArrayNDMath. norm2(INDArray in, INDArray dimensions)Euclidean norm: euclidean distance of a vector from the originINDArrayNDMath. norm2(INDArray in, INDArray dimensions, boolean keepDims)Euclidean norm: euclidean distance of a vector from the originINDArray[]NDMath. normalizeMoments(INDArray counts, INDArray means, INDArray variances, double shift)Calculate the mean and variance from the sufficient statisticsINDArrayNDBase. normmax(INDArray x, boolean keepDims, int... dimensions)Max norm (infinity norm) reduction operation: The output contains the max norm for each tensor/subset along the
specified dimensions:
out = max(abs(x[i]))
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. normmax(INDArray x, int... dimensions)Max norm (infinity norm) reduction operation: The output contains the max norm for each tensor/subset along the
specified dimensions:
out = max(abs(x[i]))
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. normMax(INDArray in, boolean keepDims, int... dimensions)Differences between max absolute valueINDArrayNDMath. normMax(INDArray in, int... dimensions)Differences between max absolute valueINDArrayNDMath. normMax(INDArray in, INDArray dimensions)Differences between max absolute valueINDArrayNDMath. normMax(INDArray in, INDArray dimensions, boolean keepDims)Differences between max absolute valueINDArrayNDBase. oneHot(INDArray indices, int depth)Convert the array to a one-hot array with values 0 and 1 for each entry
If input has shape [ a, ..., n] then output has shape [ a, ..., n, depth],
with out[i, ..., j, in[i,...,j]] = 1 with other values being set to 0
see oneHot(SDVariable, int, int, double, double)INDArrayNDBase. oneHot(INDArray indices, int depth, int axis, double on, double off)Convert the array to a one-hot array with values and for each entry
If input has shape [ a, ..., n] then output has shape [ a, ..., n, depth],
with {out[i, ..., j, in[i,...,j]] with other values being set toINDArrayNDBase. oneHot(INDArray indices, int depth, int axis, double on, double off, DataType dataType)Convert the array to a one-hot array with values and for each entry
If input has shape [ a, ..., n] then output has shape [ a, ..., n, depth],
with {out[i, ..., j, in[i,...,j]] with other values being set toINDArrayNDBase. onesLike(INDArray input)Return a variable of all 1s, with the same shape as the input variable.INDArrayNDBase. onesLike(INDArray input, DataType dataType)As per onesLike(String, SDVariable) but the output datatype may be specifiedINDArrayNDBitwise. or(INDArray x, INDArray y)Bitwise OR operation.INDArrayNDMath. or(INDArray x, INDArray y)Boolean OR operation: elementwise (x != 0) || (y != 0)
If x and y arrays have equal shape, the output shape is the same as these inputs.
Note: supports broadcasting if x and y have different shapes and are broadcastable.
Returns an array with values 1 where condition is satisfied, or value 0 otherwise.INDArrayNDImage. pad(INDArray input, INDArray padding, Mode Mode, double padValue)Pads an image according to the given padding typeINDArrayNDNN. pad(INDArray input, INDArray padding, double constant)Padding operationINDArrayNDNN. pad(INDArray input, INDArray padding, PadMode PadMode, double constant)Padding operationINDArrayNDBase. permute(INDArray x, int... dimensions)Array permutation operation: permute the dimensions according to the specified permutation indices.
Example: if input has shape [a,b,c] and dimensions = [2,0,1] the output has shape [c,a,b]INDArrayNDBase. permute(INDArray x, INDArray dimensions)Array permutation operation: permute the dimensions according to the specified permutation indices.
Example: if input has shape [a,b,c] and dimensions = [2,0,1] the output has shape [c,a,b]INDArrayNDMath. pow(INDArray x, double value)Element-wise power function: out = x^valueINDArrayNDMath. pow(INDArray x, INDArray y)Element-wise (broadcastable) power function: out = x[i]^y[i]INDArrayNDNN. preciseGelu(INDArray x)GELU activation function - Gaussian Error Linear Units
For more details, see Gaussian Error Linear Units (GELUs) - https://arxiv.org/abs/1606.08415
This method uses the precise methodINDArrayNDNN. prelu(INDArray input, INDArray alpha, int... sharedAxes)PReLU (Parameterized Rectified Linear Unit) operation.INDArrayNDBase. prod(INDArray x, boolean keepDims, int... dimensions)Product array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. prod(INDArray x, int... dimensions)Product array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. prod(INDArray x, INDArray dimensions)Product array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. prod(INDArray x, INDArray dimensions, boolean keepDims)Product array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. prod(INDArray in, boolean keepDims, int... dimensions)The max of an array along each dimensionINDArrayNDMath. prod(INDArray in, int... dimensions)The max of an array along each dimensionINDArrayNDMath. prod(INDArray in, INDArray dimensions)The product of an array long each dimensionINDArrayNDMath. prod(INDArray in, INDArray dimensions, boolean keepDims)The product of an array long each dimensionINDArray[]NDLinalg. qr(INDArray input)Computes the QR decompositions of input matrix.INDArray[]NDLinalg. qr(INDArray input, boolean full)Computes the QR decompositions of input matrix.INDArrayNDImage. randomCrop(INDArray input, INDArray shape)Randomly crops imageINDArrayNDBase. range(INDArray from, INDArray to, INDArray step, DataType dataType)Create a new variable with a 1d array, where the values start at from and increment by step
up to (but not including) limit.
For example, range(1.0, 3.0, 0.5) will return [1.0, 1.5, 2.0, 2.5]INDArrayNDBase. rank(INDArray in)Returns the rank (number of dimensions, i.e., length(shape)) of the specified INDArray as a 0D scalar variableINDArrayNDMath. rationalTanh(INDArray x)Rational Tanh Approximation elementwise function, as described in the paper:
Compact Convolutional Neural Network Cascade for Face Detection
This is a faster Tanh approximationINDArrayNDMath. rdiv(INDArray x, double value)Scalar reverse division operation, out = scalar / inINDArrayNDMath. rdiv(INDArray x, INDArray y)Pairwise reverse division operation, out = y / x
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDMath. reciprocal(INDArray x)Element-wise reciprocal (inverse) function: out[i] = 1 / in[i]INDArrayNDMath. rectifiedTanh(INDArray x)Rectified tanh operation: max(0, tanh(in))INDArrayNDMath. reduceAMax(INDArray in, boolean keepDims, int... dimensions)Absolute max array reduction operation, optionally along specified dimensions: out = max(abs(x))INDArrayNDMath. reduceAMax(INDArray in, int... dimensions)Absolute max array reduction operation, optionally along specified dimensions: out = max(abs(x))INDArrayNDMath. reduceAMax(INDArray in, INDArray dimensions)Absolute max array reduction operation, optionally along specified dimensions: out = max(abs(x))INDArrayNDMath. reduceAMax(INDArray in, INDArray dimensions, boolean keepDims)Absolute max array reduction operation, optionally along specified dimensions: out = max(abs(x))INDArrayNDMath. reduceAmean(INDArray in, boolean keepDims, int... dimensions)Absolute mean array reduction operation, optionally along specified dimensions: out = mean(abs(x))INDArrayNDMath. reduceAmean(INDArray in, int... dimensions)Absolute mean array reduction operation, optionally along specified dimensions: out = mean(abs(x))INDArrayNDMath. reduceAmean(INDArray in, INDArray dimensions)Absolute mean array reduction operation, optionally along specified dimensions: out = mean(abs(x))INDArrayNDMath. reduceAmean(INDArray in, INDArray dimensions, boolean keepDims)Absolute mean array reduction operation, optionally along specified dimensions: out = mean(abs(x))INDArrayNDMath. reduceAmin(INDArray in, boolean keepDims, int... dimensions)Absolute min array reduction operation, optionally along specified dimensions: out = min(abs(x))INDArrayNDMath. reduceAmin(INDArray in, int... dimensions)Absolute min array reduction operation, optionally along specified dimensions: out = min(abs(x))INDArrayNDMath. reduceAmin(INDArray in, INDArray dimensions)Absolute min array reduction operation, optionally along specified dimensions: out = min(abs(x))INDArrayNDMath. reduceAmin(INDArray in, INDArray dimensions, boolean keepDims)Absolute min array reduction operation, optionally along specified dimensions: out = min(abs(x))INDArrayNDMath. reduceMax(INDArray in, boolean keepDims, int... dimensions)The max of an array along each dimensionINDArrayNDMath. reduceMax(INDArray in, int... dimensions)The max of an array along each dimensionINDArrayNDMath. reduceMax(INDArray in, INDArray dimensions)The max of an array long each dimensionINDArrayNDMath. reduceMax(INDArray in, INDArray dimensions, boolean keepDims)The max of an array long each dimensionINDArrayNDMath. reduceMin(INDArray in, boolean keepDims, int... dimensions)The minimum of an array along each dimensionINDArrayNDMath. reduceMin(INDArray in, int... dimensions)The minimum of an array along each dimensionINDArrayNDMath. reduceMin(INDArray in, INDArray dimensions)The minimum of an array long each dimensionINDArrayNDMath. reduceMin(INDArray in, INDArray dimensions, boolean keepDims)The minimum of an array long each dimensionINDArrayNDNN. relu(INDArray x, double cutoff)Element-wise rectified linear function with specified cutoff:
out[i] = in[i] if in[i] >= cutoff
out[i] = 0 otherwiseINDArrayNDNN. relu6(INDArray x, double cutoff)Element-wise "rectified linear 6" function with specified cutoff:
out[i] = min(max(in, cutoff), 6)INDArrayNDNN. reluLayer(INDArray input, INDArray weights, INDArray bias)ReLU (Rectified Linear Unit) layer operation: out = relu(mmul(in,w) + bias)
Note that bias array is optionalINDArrayNDBase. repeat(INDArray input, INDArray repeats, int axis)A tensor with the shape of input minus the specified axis with elements repeated along the specified axis.INDArrayNDBase. replaceWhere(INDArray update, double value, Condition condition)Element-wise replace where condition:
out[i] = value if condition(update[i]) is satisfied, or
out[i] = update[i] if condition(update[i]) is NOT satisfiedINDArrayNDBase. replaceWhere(INDArray update, INDArray from, Condition condition)Element-wise replace where condition:
out[i] = from[i] if condition(update[i]) is satisfied, or
out[i] = update[i] if condition(update[i]) is NOT satisfiedINDArrayNDBase. reshape(INDArray x, long... shape)Reshape the input variable to the specified (fixed) shape.INDArrayNDBase. reshape(INDArray x, INDArray shape)Reshape the input variable to the specified (fixed) shape.INDArrayNDImage. resizeBiCubic(INDArray input, INDArray size, boolean alignCorners, boolean alignPixelCenters)Resize images to size using the specified method.INDArrayNDImage. resizeBiLinear(INDArray input, int height, int width, boolean alignCorners, boolean halfPixelCenters)Resize images to size using the specified method.INDArrayNDBase. reverse(INDArray x, int... dimensions)Reverse the values of an array for the specified dimensions
If input is:
[ 1, 2, 3]
[ 4, 5, 6]
then
reverse(in, 0):
[3, 2, 1]
[6, 5, 4]
reverse(in, 1):
[4, 5, 6]
[1, 2 3]INDArrayNDBase. reverseSequence(INDArray x, INDArray seq_lengths)Reverse sequence op: for each slice along dimension seqDimension, the first seqLength values are reversedINDArrayNDBase. reverseSequence(INDArray x, INDArray seq_lengths, int seqDim, int batchDim)Reverse sequence op: for each slice along dimension seqDimension, the first seqLength values are reversedINDArrayNDImage. rgbToHsv(INDArray input)Converting array from HSV to RGB formatINDArrayNDImage. rgbToYiq(INDArray input)Converting array from RGB to YIQ formatINDArrayNDImage. rgbToYuv(INDArray input)Converting array from RGB to YUV formatINDArrayNDBitwise. rightShift(INDArray x, INDArray y)Bitwise right shift operation.INDArrayNDBitwise. rightShiftCyclic(INDArray x, INDArray y)Bitwise right cyclical shift operation.INDArrayNDMath. round(INDArray x)Element-wise round function: out = round(x).
Rounds (up or down depending on value) to the nearest integer value.INDArrayNDMath. rsqrt(INDArray x)Element-wise reciprocal (inverse) of square root: out = 1.0 / sqrt(x)INDArrayNDMath. rsub(INDArray x, double value)Scalar reverse subtraction operation, out = scalar - inINDArrayNDMath. rsub(INDArray x, INDArray y)Pairwise reverse subtraction operation, out = y - x
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDBase. scalarFloorMod(INDArray in, double value)Element-wise scalar floor modulus operation: out = floorMod(in, value).
i.e., returns the remainder after division by 'value'INDArrayNDBase. scalarMax(INDArray in, double value)Element-wise scalar maximum operation: out = max(in, value)INDArrayNDBase. scalarMin(INDArray in, double value)Element-wise scalar minimum operation: out = min(in, value)INDArrayNDBase. scalarSet(INDArray in, double set)Return a variable with equal shape to the input, but all elements set to value 'set'INDArrayNDBase. scatterAdd(INDArray ref, INDArray indices, INDArray updates)Scatter addition operation.
If indices is rank 0 (a scalar), then out[index, ...] = out[index, ...] + op(updates[...])
If indices is rank 1 (a vector), then for each position i, out[indices[i], ...] = out[indices[i], ...] + op(updates[i, ...])
If indices is rank 2+, then for each position (i,...,k), out[indices[i], ..., indices[k], ...] = out[indices[i], ..., indices[k], ...] + op(updates[i, ..., k, ...])
Note that if multiple indices refer to the same location, the contributions from each is handled correctly.INDArrayNDBase. scatterDiv(INDArray ref, INDArray indices, INDArray updates)Scatter division operation.
If indices is rank 0 (a scalar), then out[index, ...] = out[index, ...] + op(updates[...])
If indices is rank 1 (a vector), then for each position i, out[indices[i], ...] = out[indices[i], ...] + op(updates[i, ...])
If indices is rank 2+, then for each position (i,...,k), out[indices[i], ..., indices[k], ...] = out[indices[i], ..., indices[k], ...] + op(updates[i, ..., k, ...])
Note that if multiple indices refer to the same location, the contributions from each is handled correctly.INDArrayNDBase. scatterMax(INDArray ref, INDArray indices, INDArray updates)Scatter max operation.
If indices is rank 0 (a scalar), then out[index, ...] = out[index, ...] + op(updates[...])
If indices is rank 1 (a vector), then for each position i, out[indices[i], ...] = out[indices[i], ...] + op(updates[i, ...])
If indices is rank 2+, then for each position (i,...,k), out[indices[i], ..., indices[k], ...] = out[indices[i], ..., indices[k], ...] + op(updates[i, ..., k, ...])
Note that if multiple indices refer to the same location, the contributions from each is handled correctly.INDArrayNDBase. scatterMin(INDArray ref, INDArray indices, INDArray updates)Scatter min operation.
If indices is rank 0 (a scalar), then out[index, ...] = out[index, ...] + op(updates[...])
If indices is rank 1 (a vector), then for each position i, out[indices[i], ...] = out[indices[i], ...] + op(updates[i, ...])
If indices is rank 2+, then for each position (i,...,k), out[indices[i], ..., indices[k], ...] = out[indices[i], ..., indices[k], ...] + op(updates[i, ..., k, ...])
Note that if multiple indices refer to the same location, the contributions from each is handled correctly.INDArrayNDBase. scatterMul(INDArray ref, INDArray indices, INDArray updates)Scatter multiplication operation.
If indices is rank 0 (a scalar), then out[index, ...] = out[index, ...] + op(updates[...])
If indices is rank 1 (a vector), then for each position i, out[indices[i], ...] = out[indices[i], ...] + op(updates[i, ...])
If indices is rank 2+, then for each position (i,...,k), out[indices[i], ..., indices[k], ...] = out[indices[i], ..., indices[k], ...] + op(updates[i, ..., k, ...])
Note that if multiple indices refer to the same location, the contributions from each is handled correctly.INDArrayNDBase. scatterSub(INDArray ref, INDArray indices, INDArray updates)Scatter subtraction operation.
If indices is rank 0 (a scalar), then out[index, ...] = out[index, ...] + op(updates[...])
If indices is rank 1 (a vector), then for each position i, out[indices[i], ...] = out[indices[i], ...] + op(updates[i, ...])
If indices is rank 2+, then for each position (i,...,k), out[indices[i], ..., indices[k], ...] = out[indices[i], ..., indices[k], ...] + op(updates[i, ..., k, ...])
Note that if multiple indices refer to the same location, the contributions from each is handled correctly.INDArrayNDBase. scatterUpdate(INDArray ref, INDArray indices, INDArray updates)Scatter update operation.
If indices is rank 0 (a scalar), then out[index, ...] = out[index, ...] + op(updates[...])
If indices is rank 1 (a vector), then for each position i, out[indices[i], ...] = out[indices[i], ...] + op(updates[i, ...])
If indices is rank 2+, then for each position (i,...,k), out[indices[i], ..., indices[k], ...] = out[indices[i], ..., indices[k], ...] + op(updates[i, ..., k, ...])
Note that if multiple indices refer to the same location, the contributions from each is handled correctly.INDArrayNDBase. segmentMax(INDArray data, INDArray segmentIds)Segment max operation.
If data = [3, 6, 1, 4, 9, 2, 8]
segmentIds = [0, 0, 1, 1, 1, 2, 2]
then output = [6, 9, 8] = [op(3,6), op(1,4,9), op(2,8)]
Note that the segment IDs must be sorted from smallest to largest segment.
See {unsortedSegment (String, SDVariable, SDVariable, int) ops
for the same op without this sorted requirementINDArrayNDBase. segmentMean(INDArray data, INDArray segmentIds)Segment mean operation.
If data = [3, 6, 1, 4, 9, 2, 8]
segmentIds = [0, 0, 1, 1, 1, 2, 2]
then output = [6, 9, 8] = [op(3,6), op(1,4,9), op(2,8)]
Note that the segment IDs must be sorted from smallest to largest segment.
See {unsortedSegment (String, SDVariable, SDVariable, int) ops
for the same op without this sorted requirementINDArrayNDBase. segmentMin(INDArray data, INDArray segmentIds)Segment min operation.
If data = [3, 6, 1, 4, 9, 2, 8]
segmentIds = [0, 0, 1, 1, 1, 2, 2]
then output = [6, 9, 8] = [op(3,6), op(1,4,9), op(2,8)]
Note that the segment IDs must be sorted from smallest to largest segment.
See {unsortedSegment (String, SDVariable, SDVariable, int) ops
for the same op without this sorted requirementINDArrayNDBase. segmentProd(INDArray data, INDArray segmentIds)Segment product operation.
If data = [3, 6, 1, 4, 9, 2, 8]
segmentIds = [0, 0, 1, 1, 1, 2, 2]
then output = [6, 9, 8] = [op(3,6), op(1,4,9), op(2,8)]
Note that the segment IDs must be sorted from smallest to largest segment.
See {unsortedSegment (String, SDVariable, SDVariable, int) ops
for the same op without this sorted requirementINDArrayNDBase. segmentSum(INDArray data, INDArray segmentIds)Segment sum operation.
If data = [3, 6, 1, 4, 9, 2, 8]
segmentIds = [0, 0, 1, 1, 1, 2, 2]
then output = [6, 9, 8] = [op(3,6), op(1,4,9), op(2,8)]
Note that the segment IDs must be sorted from smallest to largest segment.
See {unsortedSegment (String, SDVariable, SDVariable, int) ops
for the same op without this sorted requirementINDArrayNDNN. selu(INDArray x)Element-wise SeLU function - Scaled exponential Lineal Unit: see Self-Normalizing Neural Networks
out[i] = scale * alpha * (exp(in[i])-1) if in[i]>0, or 0 if in[i] <= 0
Uses default scale and alpha values.INDArrayNDCNN. separableConv2d(INDArray layerInput, INDArray depthWeights, INDArray pointWeights, INDArray bias, Conv2DConfig Conv2DConfig)Separable 2D convolution operation with optional biasINDArrayNDCNN. separableConv2d(INDArray layerInput, INDArray depthWeights, INDArray pointWeights, Conv2DConfig Conv2DConfig)Separable 2D convolution operation with optional biasINDArrayNDBase. sequenceMask(INDArray lengths, int maxLen, DataType dataType)Generate a sequence mask (with values 0 or 1) based on the specified lengths
Specifically, out[i, ..., k, j] = (j < lengths[i, ..., k] ? 1.0 : 0.0)INDArrayNDBase. sequenceMask(INDArray lengths, DataType dataType)see sequenceMask(String, SDVariable, SDVariable, DataType)INDArrayNDBase. sequenceMask(INDArray lengths, INDArray maxLen, DataType dataType)Generate a sequence mask (with values 0 or 1) based on the specified lengths
Specifically, out[i, ..., k, j] = (j < lengths[i, ..., k] ? 1.0 : 0.0)INDArrayNDMath. setDiag(INDArray in, INDArray diag)Set the diagonal value to the specified values
If input is
[ a, b, c]
[ d, e, f]
[ g, h, i]
and diag = [ 1, 2, 3] then output is
[ 1, b, c]
[ d, 2, f]
[ g, h, 3]INDArray[]NDBase. setShape(INDArray input, INDArray shape)Sets an inplace shape on the passed in input.INDArrayNDMath. shannonEntropy(INDArray in, boolean keepDims, int... dimensions)Shannon Entropy reduction: -sum(x * log2(x))INDArrayNDMath. shannonEntropy(INDArray in, int... dimensions)Shannon Entropy reduction: -sum(x * log2(x))INDArrayNDMath. shannonEntropy(INDArray in, INDArray dimensions)Shannon Entropy reduction: -sum(x * log2(x))INDArrayNDMath. shannonEntropy(INDArray in, INDArray dimensions, boolean keepDims)Shannon Entropy reduction: -sum(x * log2(x))INDArrayNDBase. shape(INDArray input)Returns the shape of the specified INDArray as a 1D INDArrayINDArrayNDNN. sigmoid(INDArray x)Element-wise sigmoid function: out[i] = 1.0/(1+exp(-in[i]))INDArrayNDLoss. sigmoidCrossEntropy(INDArray label, INDArray predictionLogits, INDArray weights)Sigmoid cross entropy: applies the sigmoid activation function on the input logits (input "pre-sigmoid preductions")
and implements the binary cross entropy loss function.INDArrayNDLoss. sigmoidCrossEntropy(INDArray label, INDArray predictionLogits, INDArray weights, LossReduce lossReduce, double labelSmoothing)Sigmoid cross entropy: applies the sigmoid activation function on the input logits (input "pre-sigmoid preductions")
and implements the binary cross entropy loss function.INDArrayNDNN. sigmoidDerivative(INDArray x, INDArray wrt)Element-wise sigmoid function derivative: dL/dIn given input and dL/dOutINDArrayNDMath. sign(INDArray x)Element-wise sign (signum) function:
out = -1 if in < 0
out = 0 if in = 0
out = 1 if in > 0INDArrayNDMath. sin(INDArray x)Elementwise sine operation: out = sin(x)INDArrayNDMath. sinh(INDArray x)Elementwise sinh (hyperbolic sine) operation: out = sinh(x)INDArrayNDBase. size(INDArray in)Returns the size (number of elements, i.e., prod(shape)) of the specified INDArray as a 0D scalar variableINDArrayNDBase. sizeAt(INDArray in, int dimension)Returns a rank 0 (scalar) variable for the size of the specified dimension.
For example, if X has shape [10,20,30] then sizeAt(X,1)=20.INDArrayNDBase. slice(INDArray input, int[] begin, int... size)Get a subset of the specified input, by specifying the first element and the size of the array.
For example, if input is:
[a, b, c]
[d, e, f]
then slice(input, begin=[0,1], size=[2,1] will return:
[b]
[e]
Note that for each dimension i, begin[i] + size[i] <= input.size(i)INDArrayNDBase. slice(INDArray input, INDArray begin, INDArray size)Get a subset of the specified input, by specifying the first element and the size of the array.
For example, if input is:
[a, b, c]
[d, e, f]
then slice(input, begin=[0,1], size=[2,1] will return:
[b]
[e]
Note that for each dimension i, begin[i] + size[i] <= input.size(i)INDArrayNDNN. softmax(INDArray x)Softmax activation, along the specified dimensionINDArrayNDNN. softmax(INDArray x, int dimension)Softmax activation, along the specified dimensionINDArrayNDLoss. softmaxCrossEntropy(INDArray oneHotLabels, INDArray logitPredictions, INDArray weights)Applies the softmax activation function to the input, then implement multi-class cross entropy:
-sum_classes label[i] * log(p[c])wherep = softmax(logits)
If LossReduce#NONE is used, returned shape is [numExamples] out for [numExamples, numClasses] predicitons/labels;
otherwise, the output is a scalar.INDArrayNDLoss. softmaxCrossEntropy(INDArray oneHotLabels, INDArray logitPredictions, INDArray weights, LossReduce lossReduce, double labelSmoothing)Applies the softmax activation function to the input, then implement multi-class cross entropy:
-sum_classes label[i] * log(p[c])wherep = softmax(logits)
If LossReduce#NONE is used, returned shape is [numExamples] out for [numExamples, numClasses] predicitons/labels;
otherwise, the output is a scalar.INDArrayNDNN. softmaxDerivative(INDArray x, INDArray wrt, int dimension)Softmax derivative functionINDArrayNDNN. softplus(INDArray x)Element-wise softplus function: out = log(exp(x) + 1)INDArrayNDNN. softsign(INDArray x)Element-wise softsign function: out = x / (abs(x) + 1)INDArrayNDNN. softsignDerivative(INDArray x)Element-wise derivative (dOut/dIn) of the softsign function softsign(INDArray)INDArrayNDLinalg. solve(INDArray matrix, INDArray rhs)Solver for systems of linear equations.INDArrayNDLinalg. solve(INDArray matrix, INDArray rhs, boolean adjoint)Solver for systems of linear equations.INDArrayNDCNN. spaceToBatch(INDArray x, int[] blocks, int[] paddingTop, int... paddingBottom)Convolution 2d layer space to batch operation on 4d input.
Increases input batch dimension by rearranging data from spatial dimensions into batch dimensionINDArrayNDCNN. spaceToDepth(INDArray x, int blockSize, DataFormat dataFormat)Convolution 2d layer space to depth operation on 4d input.
Increases input channels (reduced spatial dimensions) by rearranging data into a larger channels dimension
Example: if input has shape [mb, 2, 4, 4] and block size is 2, then output size is [mb, 8/(2*2), 2*2, 2*2]
= [mb, 2, 4, 4]INDArrayNDLoss. sparseSoftmaxCrossEntropy(INDArray logits, INDArray labels)As per softmaxCrossEntropy(String, SDVariable, SDVariable, LossReduce) but the labels variable
is represented as an integer array instead of the equivalent one-hot array.
i.e., if logits are rank N, then labels have rank N-1INDArrayNDBase. sparseToDense(INDArray indices, INDArray shape, INDArray values)Create a dense matrix equivalent of a sparse matrix based on the given input.INDArrayNDBase. sparseToDense(INDArray indices, INDArray shape, INDArray values, INDArray defaultValue)Create a dense matrix equivalent of a sparse matrix based on the given input.INDArray[]NDBase. split(INDArray input, int numSplit, int splitDim)Split a value in to a list of ndarrays.INDArray[]NDBase. split(INDArray input, INDArray numSplit, int splitDim)Split a value in to a list of ndarrays.INDArray[]NDBase. splitV(INDArray input, INDArray sizes, int numSplit, int splitDim)Split a value in to a list of ndarrays with varying sizes
according to the sizes parameter.INDArrayNDMath. sqrt(INDArray x)Element-wise square root function: out = sqrt(x)INDArrayNDMath. square(INDArray x)Element-wise square function: out = x^2INDArrayNDMath. squaredDifference(INDArray x, INDArray y)Pairwise squared difference operation.
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDBase. squaredNorm(INDArray x, boolean keepDims, int... dimensions)Squared L2 norm: see norm2(String, SDVariable, boolean, int...)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. squaredNorm(INDArray x, int... dimensions)Squared L2 norm: see norm2(String, SDVariable, boolean, int...)
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. squaredNorm(INDArray in, boolean keepDims, int... dimensions)Sum of squared differences.INDArrayNDMath. squaredNorm(INDArray in, int... dimensions)Sum of squared differences.INDArrayNDMath. squaredNorm(INDArray in, INDArray dimensions)Sum of squared differences.INDArrayNDMath. squaredNorm(INDArray in, INDArray dimensions, boolean keepDims)Sum of squared differences.INDArrayNDBase. squeeze(INDArray x, int axis)Remove a single dimension of size 1.
For example, if input has shape [a,b,1,c] then squeeze(input, 2) returns an array of shape [a,b,c]INDArrayNDRNN. sru(INDArray x, INDArray initialC, INDArray mask, SRUWeights SRUWeights)The SRU layer.INDArrayNDRNN. sru(INDArray x, INDArray initialC, SRUWeights SRUWeights)The SRU layer.INDArrayNDRNN. sruCell(INDArray x, INDArray cLast, SRUWeights SRUWeights)The SRU layer.INDArrayNDBase. stack(int axis, INDArray... values)Stack a set of N INDArray of rank X into one rank X+1 variable.
If inputs have shape [a,b,c] then output has shape:
axis = 0: [N,a,b,c]
axis = 1: [a,N,b,c]
axis = 2: [a,b,N,c]
axis = 3: [a,b,c,N]
see unstack(String[], SDVariable, int, int)INDArrayNDBase. standardDeviation(INDArray x, boolean biasCorrected, boolean keepDims, int... dimensions)Standard deviation array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. standardDeviation(INDArray x, boolean biasCorrected, int... dimensions)Standard deviation array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. standardize(INDArray x, int... dimensions)Standardize input variable along given axisINDArrayNDMath. step(INDArray x, double value)Elementwise step function:
out(x) = 1 if x >= cutoff
out(x) = 0 otherwiseINDArrayNDBase. stridedSlice(INDArray in, long[] begin, long[] end, long... strides)Get a subset of the specified input, by specifying the first element, last element, and the strides.
For example, if input is:
[a, b, c]
[d, e, f]
[g, h, i]
then stridedSlice(input, begin=[0,1], end=[2,2], strides=[2,1], all masks = 0) will return:
[b, c]
[h, i]INDArrayNDBase. stridedSlice(INDArray in, long[] begin, long[] end, long[] strides, int beginMask, int endMask, int ellipsisMask, int newAxisMask, int shrinkAxisMask)Get a subset of the specified input, by specifying the first element, last element, and the strides.
For example, if input is:
[a, b, c]
[d, e, f]
[g, h, i]
then stridedSlice(input, begin=[0,1], end=[2,2], strides=[2,1], all masks = 0) will return:
[b, c]
[h, i]INDArrayNDBase. stridedSlice(INDArray in, INDArray begin, INDArray end, INDArray strides)Get a subset of the specified input, by specifying the first element, last element, and the strides.
For example, if input is:
[a, b, c]
[d, e, f]
[g, h, i]
then stridedSlice(input, begin=[0,1], end=[2,2], strides=[2,1], all masks = 0) will return:
[b, c]
[h, i]INDArrayNDBase. stridedSlice(INDArray in, INDArray begin, INDArray end, INDArray strides, int beginMask, int endMask, int ellipsisMask, int newAxisMask, int shrinkAxisMask)Get a subset of the specified input, by specifying the first element, last element, and the strides.
For example, if input is:
[a, b, c]
[d, e, f]
[g, h, i]
then stridedSlice(input, begin=[0,1], end=[2,2], strides=[2,1], all masks = 0) will return:
[b, c]
[h, i]INDArrayNDMath. sub(INDArray x, double value)Scalar subtraction operation, out = in - scalarINDArrayNDMath. sub(INDArray x, INDArray y)Pairwise subtraction operation, out = x - y
Note: supports broadcasting if x and y have different shapes and are broadcastable.
For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10]
Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.htmlINDArrayNDBase. sum(INDArray x, boolean keepDims, int... dimensions)Sum array reduction operation, optionally along specified dimensions.
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. sum(INDArray x, int... dimensions)Sum array reduction operation, optionally along specified dimensions.
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDMath. sum(INDArray in, boolean keepDims, int... dimensions)Sum of an array, optionally along specified dimensions: out = sum(x))INDArrayNDMath. sum(INDArray in, int... dimensions)Sum of an array, optionally along specified dimensions: out = sum(x))INDArrayNDMath. sum(INDArray in, INDArray dimensions)Sum of an array, optionally along specified dimensions: out = sum(x))INDArrayNDMath. sum(INDArray in, INDArray dimensions, boolean keepDims)Sum of an array, optionally along specified dimensions: out = sum(x))INDArrayNDLinalg. svd(INDArray input, boolean fullUV, boolean computeUV)Calculates singular value decomposition.INDArrayNDLinalg. svd(INDArray input, boolean fullUV, boolean computeUV, int switchNum)Calculates singular value decomposition.INDArrayNDNN. swish(INDArray x)Element-wise "swish" function: out = x * sigmoid(b*x) with b=1.0
See: https://arxiv.org/abs/1710.05941INDArray[]NDBase. switchOp(INDArray x, INDArray predicate)Switch operation
Predicate - if false, values are output to left (first) branch/output; if true, to right (second) branch/outputINDArrayNDMath. tan(INDArray x)Elementwise tangent operation: out = tan(x)INDArrayNDMath. tanh(INDArray x)Elementwise tanh (hyperbolic tangent) operation: out = tanh(x)INDArrayNDNN. tanh(INDArray x)Elementwise tanh (hyperbolic tangent) operation: out = tanh(x)INDArrayNDBase. tensorMmul(INDArray x, INDArray y, int[] dimensionsX, int... dimensionsY)//TODO: Ops must be documented.INDArrayNDBase. tensorMmul(INDArray x, INDArray y, int[] dimensionsX, int[] dimensionsY, boolean transposeX, boolean transposeY, boolean transposeZ)//TODO: Ops must be documented.INDArrayNDBase. tile(INDArray x, int... repeat)see tile(String, SDVariable, int...)INDArrayNDBase. tile(INDArray x, INDArray repeat)Repeat (tile) the input tensor the specified number of times.
For example, if input is
[1, 2]
[3, 4]
and repeat is [2, 3]
then output is
[1, 2, 1, 2, 1, 2]
[3, 4, 3, 4, 3, 4]
[1, 2, 1, 2, 1, 2]
[3, 4, 3, 4, 3, 4]INDArray[]NDNN. topK(INDArray input, double k, boolean sorted)Find values and indices for the largest k entries along the last dimension.INDArrayNDMath. trace(INDArray in)Matrix trace operation
For rank 2 matrices, the output is a scalar with the trace - i.e., sum of the main diagonal.
For higher rank inputs, output[a,b,c] = trace(in[a,b,c,:,:])INDArrayNDBase. transpose(INDArray x)Matrix transpose operation: If input has shape [a,b] output has shape [b,a]INDArrayNDLinalg. triangularSolve(INDArray matrix, INDArray rhs, boolean lower, boolean adjoint)Solver for systems of linear questions.INDArrayNDLinalg. triu(INDArray input)Upper triangle of an array.INDArrayNDLinalg. triu(INDArray input, int diag)Upper triangle of an array.INDArrayNDBase. unsortedSegmentMax(INDArray data, INDArray segmentIds, int numSegments)Unsorted segment max operation.INDArrayNDBase. unsortedSegmentMax(INDArray data, INDArray segmentIds, INDArray numSegments)Unsorted segment max operation.INDArrayNDBase. unsortedSegmentMean(INDArray data, INDArray segmentIds, int numSegments)Unsorted segment mean operation.INDArrayNDBase. unsortedSegmentMean(INDArray data, INDArray segmentIds, INDArray numSegments)Unsorted segment mean operation.INDArrayNDBase. unsortedSegmentMin(INDArray data, INDArray segmentIds, int numSegments)Unsorted segment min operation.INDArrayNDBase. unsortedSegmentMin(INDArray data, INDArray segmentIds, INDArray numSegments)Unsorted segment min operation.INDArrayNDBase. unsortedSegmentProd(INDArray data, INDArray segmentIds, int numSegments)Unsorted segment product operation.INDArrayNDBase. unsortedSegmentProd(INDArray data, INDArray segmentIds, INDArray numSegments)Unsorted segment product operation.INDArrayNDBase. unsortedSegmentSqrtN(INDArray data, INDArray segmentIds, int numSegments)Unsorted segment sqrtN operation.INDArrayNDBase. unsortedSegmentSqrtN(INDArray data, INDArray segmentIds, INDArray numSegments)Unsorted segment sqrtN operation.INDArrayNDBase. unsortedSegmentSum(INDArray data, INDArray segmentIds, int numSegments)Unsorted segment sum operation.INDArrayNDBase. unsortedSegmentSum(INDArray data, INDArray segmentIds, INDArray numSegments)Unsorted segment sum operation.INDArray[]NDBase. unstack(INDArray value, int axis, int num)Unstack a variable of rank X into N rank X-1 variables by taking slices along the specified axis.
If input has shape [a,b,c] then output has shape:
axis = 0: [b,c]
axis = 1: [a,c]
axis = 2: [a,b]INDArrayNDCNN. upsampling2d(INDArray input, int scale)Upsampling layer for 2D inputs.
scale is used for both height and width dimensions.INDArrayNDCNN. upsampling2d(INDArray input, int scaleH, int scaleW, boolean nchw)2D Convolution layer operation - Upsampling 2dINDArrayNDCNN. upsampling3d(INDArray input, boolean ncdhw, int scaleD, int scaleH, int scaleW)3D Convolution layer operation - Upsampling 3dINDArrayNDBase. variance(INDArray x, boolean biasCorrected, boolean keepDims, int... dimensions)Variance array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. variance(INDArray x, boolean biasCorrected, int... dimensions)Variance array reduction operation, optionally along specified dimensions
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. where(INDArray condition)Returns elements that are true from the given condition array
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. where(INDArray x, INDArray condition)Similar to numpy where, takes elements from x or y depending on whether the condition at a given element is true or false
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. where(INDArray x, INDArray y, INDArray condition)Similar to numpy where, takes elements from x or y depending on whether the condition at a given element is true or false
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBase. whereNumpy(INDArray x, INDArray y, INDArray condition)As implemented in numpy, Return elements chosen from x or y depending on condition.
Note that if keepDims = true, the output variable has the same rank as the input variable,
with the reduced dimensions having size 1.INDArrayNDBitwise. xor(INDArray x, INDArray y)Bitwise XOR operation (exclusive OR).INDArrayNDMath. xor(INDArray x, INDArray y)Boolean XOR (exclusive OR) operation: elementwise (x != 0) XOR (y != 0)
If x and y arrays have equal shape, the output shape is the same as these inputs.
Note: supports broadcasting if x and y have different shapes and are broadcastable.
Returns an array with values 1 where condition is satisfied, or value 0 otherwise.INDArrayNDImage. yiqToRgb(INDArray input)Converting image from YIQ to RGB formatINDArrayNDImage. yuvToRgb(INDArray input)Converting image from YUV to RGB formatINDArrayNDMath. zeroFraction(INDArray input)Full array zero fraction array reduction operation, optionally along specified dimensions: out = (count(x == 0) / length(x))INDArrayNDBase. zerosLike(INDArray input)Return a variable of all 0s, with the same shape as the input variable. -
Uses of INDArray in org.nd4j.linalg.heartbeat.utils
Methods in org.nd4j.linalg.heartbeat.utils with parameters of type INDArray Modifier and Type Method Description static TaskTaskUtils. buildTask(INDArray array)static TaskTaskUtils. buildTask(INDArray[] array, INDArray[] labels)static TaskTaskUtils. buildTask(INDArray array, INDArray labels) -
Uses of INDArray in org.nd4j.linalg.indexing
Methods in org.nd4j.linalg.indexing that return INDArray Modifier and Type Method Description static INDArrayBooleanIndexing. applyMask(INDArray arr, INDArray mask)A minor shortcut for applying a bitmask to a matrixstatic INDArrayBooleanIndexing. applyMaskInPlace(INDArray arr, INDArray mask)A minor shortcut for applying a bitmask to a matrixstatic INDArrayBooleanIndexing. chooseFrom(@NonNull INDArray[] input, @NonNull List<Double> tArgs, @NonNull List<Integer> iArgs, @NonNull Condition condition)Choose from the inputs based on the given condition.static INDArrayBooleanIndexing. chooseFrom(@NonNull INDArray[] input, @NonNull Condition condition)Choose from the inputs based on the given condition.static INDArrayBooleanIndexing. firstIndex(INDArray array, Condition condition)This method returns first index matching given condition PLEASE NOTE: This method will return -1 value if condition wasn't metstatic INDArrayBooleanIndexing. firstIndex(INDArray array, Condition condition, int... dimension)This method returns first index matching given condition along given dimensions PLEASE NOTE: This method will return -1 values for missing conditionsstatic INDArrayBooleanIndexing. lastIndex(INDArray array, Condition condition)This method returns last index matching given condition PLEASE NOTE: This method will return -1 value if condition wasn't metstatic INDArrayBooleanIndexing. lastIndex(INDArray array, Condition condition, int... dimension)This method returns first index matching given condition along given dimensions PLEASE NOTE: This method will return -1 values for missing conditionsMethods in org.nd4j.linalg.indexing with parameters of type INDArray Modifier and Type Method Description static INDArrayIndex[]NDArrayIndex. allFor(INDArray arr)Generate an all index equal to the rank of the given arraystatic booleanBooleanIndexing. and(INDArray n, Condition cond)And over the whole ndarray given some conditionstatic boolean[]BooleanIndexing. and(INDArray n, Condition condition, int... dimension)And over the whole ndarray given some condition, with respect to dimensionsstatic INDArrayBooleanIndexing. applyMask(INDArray arr, INDArray mask)A minor shortcut for applying a bitmask to a matrixstatic INDArrayBooleanIndexing. applyMaskInPlace(INDArray arr, INDArray mask)A minor shortcut for applying a bitmask to a matrixstatic voidBooleanIndexing. assignIf(@NonNull INDArray to, @NonNull INDArray from, @NonNull Condition condition)This method does element-wise comparison for 2 equal-sized matrices, for each element that matches Condition.static INDArrayBooleanIndexing. chooseFrom(@NonNull INDArray[] input, @NonNull List<Double> tArgs, @NonNull List<Integer> iArgs, @NonNull Condition condition)Choose from the inputs based on the given condition.static INDArrayBooleanIndexing. chooseFrom(@NonNull INDArray[] input, @NonNull Condition condition)Choose from the inputs based on the given condition.static INDArrayIndex[]Indices. createFromStartAndEnd(INDArray start, INDArray end)Create an n dimensional index based on the given interval indices.static INDArrayIndex[]Indices. createFromStartAndEnd(INDArray start, INDArray end, boolean inclusive)Create indices representing intervals along each dimensionstatic INDArrayBooleanIndexing. firstIndex(INDArray array, Condition condition)This method returns first index matching given condition PLEASE NOTE: This method will return -1 value if condition wasn't metstatic INDArrayBooleanIndexing. firstIndex(INDArray array, Condition condition, int... dimension)This method returns first index matching given condition along given dimensions PLEASE NOTE: This method will return -1 values for missing conditionsvoidINDArrayIndex. init(INDArray arr, int dimension)Init the index wrt the dimension and the given nd arrayvoidINDArrayIndex. init(INDArray arr, long begin, int dimension)Init the index wrt the dimension and the given nd arrayvoidIntervalIndex. init(INDArray arr, int dimension)voidIntervalIndex. init(INDArray arr, long begin, int dimension)voidNDArrayIndex. init(INDArray arr, int dimension)voidNDArrayIndex. init(INDArray arr, long begin, int dimension)voidNDArrayIndexAll. init(INDArray arr, long begin, int dimension)voidNewAxis. init(INDArray arr, int dimension)voidNewAxis. init(INDArray arr, long begin, int dimension)voidPointIndex. init(INDArray arr, int dimension)voidPointIndex. init(INDArray arr, long begin, int dimension)voidSpecifiedIndex. init(INDArray arr, int dimension)voidSpecifiedIndex. init(INDArray arr, long begin, int dimension)static booleanIndices. isScalar(INDArray indexOver, INDArrayIndex... indexes)Check if the given indexes over the specified array are searching for a scalarstatic INDArrayBooleanIndexing. lastIndex(INDArray array, Condition condition)This method returns last index matching given condition PLEASE NOTE: This method will return -1 value if condition wasn't metstatic INDArrayBooleanIndexing. lastIndex(INDArray array, Condition condition, int... dimension)This method returns first index matching given condition along given dimensions PLEASE NOTE: This method will return -1 values for missing conditionsstatic longIndices. linearOffset(int index, INDArray arr)Compute the linear offset for an index in an ndarray.static longNDArrayIndex. offset(INDArray arr, long... offsets)Compute the offset given an array of offsets.static longNDArrayIndex. offset(INDArray arr, INDArrayIndex... indices)Compute the offset given an array of offsets.static booleanBooleanIndexing. or(INDArray n, Condition cond)Or over the whole ndarray given some conditionstatic boolean[]BooleanIndexing. or(INDArray n, Condition condition, int... dimension)Or over the whole ndarray given some condition, with respect to dimensionsstatic voidBooleanIndexing. replaceWhere(@NonNull INDArray to, @NonNull Number set, @NonNull Condition condition)This method does element-wise assessing for 2 equal-sized matrices, for each element that matches Conditionstatic voidBooleanIndexing. replaceWhere(@NonNull INDArray to, @NonNull INDArray from, @NonNull Condition condition)This method does element-wise comparison for 2 equal-sized matrices, for each element that matches Conditionstatic INDArrayIndex[]NDArrayIndex. resolve(INDArray arr, INDArrayIndex... intendedIndexes)Given an all index and the intended indexes, return an index array containing a combination of all elements for slicing and overriding particular indexes where necessarystatic intIndices. rowNumber(int index, INDArray arr)Compute the linear offset for an index in an ndarray.static int[]Indices. stride(INDArray arr, INDArrayIndex[] indexes, int... shape)Return the stride to be used for indexing -
Uses of INDArray in org.nd4j.linalg.indexing.masking
Methods in org.nd4j.linalg.indexing.masking that return INDArray Modifier and Type Method Description static INDArrayMasking. applyMask(INDArray input, INDArray mask, int axis)Applies a boolean mask to the given input.Methods in org.nd4j.linalg.indexing.masking with parameters of type INDArray Modifier and Type Method Description static INDArrayMasking. applyMask(INDArray input, INDArray mask, int axis)Applies a boolean mask to the given input. -
Uses of INDArray in org.nd4j.linalg.inverse
Methods in org.nd4j.linalg.inverse that return INDArray Modifier and Type Method Description static INDArrayInvertMatrix. invert(INDArray arr, boolean inPlace)Inverts a matrixstatic INDArrayInvertMatrix. pinvert(INDArray arr, boolean inPlace)Calculates pseudo inverse of a matrix using QR decompositionstatic INDArrayInvertMatrix. pLeftInvert(INDArray arr, boolean inPlace)Compute the left pseudo inverse.static INDArrayInvertMatrix. pRightInvert(INDArray arr, boolean inPlace)Compute the right pseudo inverse.Methods in org.nd4j.linalg.inverse with parameters of type INDArray Modifier and Type Method Description static INDArrayInvertMatrix. invert(INDArray arr, boolean inPlace)Inverts a matrixstatic INDArrayInvertMatrix. pinvert(INDArray arr, boolean inPlace)Calculates pseudo inverse of a matrix using QR decompositionstatic INDArrayInvertMatrix. pLeftInvert(INDArray arr, boolean inPlace)Compute the left pseudo inverse.static INDArrayInvertMatrix. pRightInvert(INDArray arr, boolean inPlace)Compute the right pseudo inverse. -
Uses of INDArray in org.nd4j.linalg.learning
Fields in org.nd4j.linalg.learning declared as INDArray Modifier and Type Field Description INDArrayAdaGradUpdater. historicalGradientMethods in org.nd4j.linalg.learning that return types with arguments of type INDArray Modifier and Type Method Description Map<String,INDArray>AdaBeliefUpdater. getState()Map<String,INDArray>AdaDeltaUpdater. getState()Map<String,INDArray>AdaGradUpdater. getState()Map<String,INDArray>AdaMaxUpdater. getState()Map<String,INDArray>AdamUpdater. getState()Map<String,INDArray>AMSGradUpdater. getState()Map<String,INDArray>GradientUpdater. getState()Map<String,INDArray>NadamUpdater. getState()Map<String,INDArray>NesterovsUpdater. getState()Map<String,INDArray>NoOpUpdater. getState()Map<String,INDArray>RmsPropUpdater. getState()Map<String,INDArray>SgdUpdater. getState()Methods in org.nd4j.linalg.learning with parameters of type INDArray Modifier and Type Method Description voidAdaBeliefUpdater. applyUpdater(INDArray gradient, int iteration, int epoch)Calculate the update based on the given gradientvoidAdaDeltaUpdater. applyUpdater(INDArray gradient, int iteration, int epoch)Get the updated gradient for the given gradient and also update the state of ada delta.voidAdaGradUpdater. applyUpdater(INDArray gradient, int iteration, int epoch)Gets feature specific learning rates Adagrad keeps a history of gradients being passed in.voidAdaMaxUpdater. applyUpdater(INDArray gradient, int iteration, int epoch)Calculate the update based on the given gradientvoidAdamUpdater. applyUpdater(INDArray gradient, int iteration, int epoch)Calculate the update based on the given gradientvoidAMSGradUpdater. applyUpdater(INDArray gradient, int iteration, int epoch)voidGradientUpdater. applyUpdater(INDArray gradient, int iteration, int epoch)Modify the gradient to be an update.voidNadamUpdater. applyUpdater(INDArray gradient, int iteration, int epoch)Calculate the update based on the given gradientvoidNesterovsUpdater. applyUpdater(INDArray gradient, int iteration, int epoch)Get the nesterov updatevoidNoOpUpdater. applyUpdater(INDArray gradient, int iteration, int epoch)voidRmsPropUpdater. applyUpdater(INDArray gradient, int iteration, int epoch)voidSgdUpdater. applyUpdater(INDArray gradient, int iteration, int epoch)voidAdaBeliefUpdater. setStateViewArray(INDArray viewArray, long[] gradientShape, char gradientOrder, boolean initialize)voidAdaDeltaUpdater. setStateViewArray(INDArray viewArray, long[] gradientShape, char gradientOrder, boolean initialize)voidAdaGradUpdater. setStateViewArray(INDArray viewArray, long[] gradientShape, char gradientOrder, boolean initialize)voidAdaMaxUpdater. setStateViewArray(INDArray viewArray, long[] gradientShape, char gradientOrder, boolean initialize)voidAdamUpdater. setStateViewArray(INDArray viewArray, long[] gradientShape, char gradientOrder, boolean initialize)voidAMSGradUpdater. setStateViewArray(INDArray viewArray, long[] gradientShape, char gradientOrder, boolean initialize)voidGradientUpdater. setStateViewArray(INDArray viewArray, long[] gradientShape, char gradientOrder, boolean initialize)For the internal updater state (if any): set this to use the provided array.voidNadamUpdater. setStateViewArray(INDArray viewArray, long[] gradientShape, char gradientOrder, boolean initialize)voidNesterovsUpdater. setStateViewArray(INDArray viewArray, long[] gradientShape, char gradientOrder, boolean initialize)voidNoOpUpdater. setStateViewArray(INDArray viewArray, long[] shape, char order, boolean initialize)voidRmsPropUpdater. setStateViewArray(INDArray viewArray, long[] gradientShape, char gradientOrder, boolean initialize)voidSgdUpdater. setStateViewArray(INDArray viewArray, long[] gradientShape, char gradientOrder, boolean initialize)Method parameters in org.nd4j.linalg.learning with type arguments of type INDArray Modifier and Type Method Description voidAdaBeliefUpdater. setState(@NonNull Map<String,INDArray> stateMap, boolean initialize)voidAdaDeltaUpdater. setState(Map<String,INDArray> stateMap, boolean initialize)voidAdaGradUpdater. setState(Map<String,INDArray> stateMap, boolean initialize)voidAdaMaxUpdater. setState(@NonNull Map<String,INDArray> stateMap, boolean initialize)voidAdamUpdater. setState(@NonNull Map<String,INDArray> stateMap, boolean initialize)voidAMSGradUpdater. setState(@NonNull Map<String,INDArray> stateMap, boolean initialize)voidGradientUpdater. setState(Map<String,INDArray> stateMap, boolean initialize)voidNadamUpdater. setState(@NonNull Map<String,INDArray> stateMap, boolean initialize)voidNesterovsUpdater. setState(@NonNull Map<String,INDArray> stateMap, boolean initialize)voidNoOpUpdater. setState(Map<String,INDArray> stateMap, boolean initialize)voidRmsPropUpdater. setState(@NonNull Map<String,INDArray> stateMap, boolean initialize)voidSgdUpdater. setState(Map<String,INDArray> stateMap, boolean initialize) -
Uses of INDArray in org.nd4j.linalg.learning.config
Methods in org.nd4j.linalg.learning.config with parameters of type INDArray Modifier and Type Method Description GradientUpdaterAdaBelief. instantiate(INDArray viewArray, boolean initializeViewArray)GradientUpdaterAdaDelta. instantiate(INDArray viewArray, boolean initializeViewArray)GradientUpdaterAdaGrad. instantiate(INDArray viewArray, boolean initializeViewArray)GradientUpdaterAdam. instantiate(INDArray viewArray, boolean initializeViewArray)GradientUpdaterAdaMax. instantiate(INDArray viewArray, boolean initializeViewArray)GradientUpdaterAMSGrad. instantiate(INDArray viewArray, boolean initializeViewArray)GradientUpdaterIUpdater. instantiate(INDArray viewArray, boolean initializeViewArray)Create a new gradient updaterGradientUpdaterNadam. instantiate(INDArray viewArray, boolean initializeViewArray)GradientUpdaterNesterovs. instantiate(INDArray viewArray, boolean initializeViewArray)GradientUpdaterNoOp. instantiate(INDArray viewArray, boolean initializeViewArray)GradientUpdaterRmsProp. instantiate(INDArray viewArray, boolean initializeViewArray)GradientUpdaterSgd. instantiate(INDArray viewArray, boolean initializeViewArray)Method parameters in org.nd4j.linalg.learning.config with type arguments of type INDArray Modifier and Type Method Description GradientUpdaterAdaBelief. instantiate(Map<String,INDArray> updaterState, boolean initializeStateArrays)GradientUpdaterAdaDelta. instantiate(Map<String,INDArray> updaterState, boolean initializeStateArrays)GradientUpdaterAdaGrad. instantiate(Map<String,INDArray> updaterState, boolean initializeStateArrays)GradientUpdaterAdam. instantiate(Map<String,INDArray> updaterState, boolean initializeStateArrays)GradientUpdaterAdaMax. instantiate(Map<String,INDArray> updaterState, boolean initializeStateArrays)GradientUpdaterAMSGrad. instantiate(Map<String,INDArray> updaterState, boolean initializeStateArrays)GradientUpdaterIUpdater. instantiate(Map<String,INDArray> updaterState, boolean initializeStateArrays)GradientUpdaterNadam. instantiate(Map<String,INDArray> updaterState, boolean initializeStateArrays)GradientUpdaterNesterovs. instantiate(Map<String,INDArray> updaterState, boolean initializeStateArrays)GradientUpdaterNoOp. instantiate(Map<String,INDArray> updaterState, boolean initializeStateArrays)GradientUpdaterRmsProp. instantiate(Map<String,INDArray> updaterState, boolean initializeStateArrays)GradientUpdaterSgd. instantiate(Map<String,INDArray> updaterState, boolean initializeStateArrays) -
Uses of INDArray in org.nd4j.linalg.learning.legacy
Fields in org.nd4j.linalg.learning.legacy declared as INDArray Modifier and Type Field Description INDArrayAdaGrad. historicalGradientMethods in org.nd4j.linalg.learning.legacy that return INDArray Modifier and Type Method Description INDArrayAdaGrad. getGradient(INDArray gradient, int iteration)Gets feature specific learning rates Adagrad keeps a history of gradients being passed in.INDArrayAdaGrad. getGradient(INDArray gradient, int slice, long[] shape)Methods in org.nd4j.linalg.learning.legacy with parameters of type INDArray Modifier and Type Method Description INDArrayAdaGrad. getGradient(INDArray gradient, int iteration)Gets feature specific learning rates Adagrad keeps a history of gradients being passed in.INDArrayAdaGrad. getGradient(INDArray gradient, int slice, long[] shape)voidAdaGrad. setStateViewArray(INDArray viewArray, int[] gradientShape, char gradientOrder, boolean initialize)voidAdaGrad. setStateViewArray(INDArray viewArray, long[] gradientShape, char gradientOrder, boolean initialize) -
Uses of INDArray in org.nd4j.linalg.learning.regularization
Methods in org.nd4j.linalg.learning.regularization with parameters of type INDArray Modifier and Type Method Description voidL1Regularization. apply(INDArray param, INDArray gradView, double lr, int iteration, int epoch)voidL2Regularization. apply(INDArray param, INDArray gradView, double lr, int iteration, int epoch)voidRegularization. apply(INDArray param, INDArray gradView, double lr, int iteration, int epoch)Apply the regularization by modifying the gradient array in-placevoidWeightDecay. apply(INDArray param, INDArray gradView, double lr, int iteration, int epoch)doubleL1Regularization. score(INDArray param, int iteration, int epoch)doubleL2Regularization. score(INDArray param, int iteration, int epoch)doubleRegularization. score(INDArray param, int iteration, int epoch)Calculate the loss function score component for the regularization.
For example, in L2 regularization, this would returnL = 0.5 * sum_i param[i]^2
For regularization types that don't have a score component, this method can return 0.doubleWeightDecay. score(INDArray param, int iteration, int epoch) -
Uses of INDArray in org.nd4j.linalg.lossfunctions
Methods in org.nd4j.linalg.lossfunctions that return INDArray Modifier and Type Method Description INDArrayILossFunction. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)Compute the gradient of the loss function with respect to the inputs: dL/dOutputINDArraySameDiffLoss. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)Compute the gradient of the loss function with respect to the inputs: dL/dOutputINDArrayILossFunction. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)Compute the score (loss function value) for each example individually.INDArraySameDiffLoss. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)Compute the score (loss function value) for each example individually.Methods in org.nd4j.linalg.lossfunctions that return types with arguments of type INDArray Modifier and Type Method Description Pair<Double,INDArray>ILossFunction. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Compute both the score (loss function value) and gradient.Pair<Double,INDArray>SameDiffLoss. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Compute both the score (loss function value) and gradient.Methods in org.nd4j.linalg.lossfunctions with parameters of type INDArray Modifier and Type Method Description static voidLossUtil. applyMask(INDArray to, INDArray mask)INDArrayILossFunction. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)Compute the gradient of the loss function with respect to the inputs: dL/dOutputINDArraySameDiffLoss. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)Compute the gradient of the loss function with respect to the inputs: dL/dOutputPair<Double,INDArray>ILossFunction. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Compute both the score (loss function value) and gradient.Pair<Double,INDArray>SameDiffLoss. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Compute both the score (loss function value) and gradient.doubleILossFunction. computeScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Compute the score (loss function value) for the given inputs.doubleSameDiffLoss. computeScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Compute the score (loss function value) for the given inputs.INDArrayILossFunction. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)Compute the score (loss function value) for each example individually.INDArraySameDiffLoss. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)Compute the score (loss function value) for each example individually.static booleanLossUtil. isPerOutputMasking(INDArray to, INDArray mask) -
Uses of INDArray in org.nd4j.linalg.lossfunctions.impl
Fields in org.nd4j.linalg.lossfunctions.impl declared as INDArray Modifier and Type Field Description protected INDArrayLossL1. weightsprotected INDArrayLossL2. weightsprotected INDArrayLossMCXENT. weightsMethods in org.nd4j.linalg.lossfunctions.impl that return INDArray Modifier and Type Method Description INDArrayLossBinaryXENT. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossCosineProximity. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossFMeasure. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossHinge. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossKLD. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossL1. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossL2. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMAE. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMAPE. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMCXENT. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMixtureDensity. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)This method returns the gradient of the cost function with respect to the output from the previous layer.INDArrayLossMSE. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMSLE. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMultiLabel. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossPoisson. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossSparseMCXENT. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossSquaredHinge. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossWasserstein. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossBinaryXENT. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossCosineProximity. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossFMeasure. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossHinge. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossKLD. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossL1. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossL2. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMAE. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMAPE. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMCXENT. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMixtureDensity. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)This method returns the score for each of the given outputs against the given set of labels.INDArrayLossMSE. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMSLE. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMultiLabel. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossPoisson. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossSparseMCXENT. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossSquaredHinge. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossWasserstein. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossCosineProximity. scoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossHinge. scoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossL1. scoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)protected INDArrayLossL2. scoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMAPE. scoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)protected INDArrayLossMCXENT. scoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMSLE. scoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMultiLabel. scoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossPoisson. scoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossSquaredHinge. scoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)protected INDArrayLossSparseMCXENT. sparseScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)Methods in org.nd4j.linalg.lossfunctions.impl that return types with arguments of type INDArray Modifier and Type Method Description Pair<Double,INDArray>LossBinaryXENT. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossCosineProximity. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossFMeasure. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossHinge. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossKLD. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossL1. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossL2. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossMAPE. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossMCXENT. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossMixtureDensity. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossMSLE. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossMultiLabel. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossPoisson. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossSparseMCXENT. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossSquaredHinge. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossWasserstein. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Methods in org.nd4j.linalg.lossfunctions.impl with parameters of type INDArray Modifier and Type Method Description INDArrayLossBinaryXENT. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossCosineProximity. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossFMeasure. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossHinge. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossKLD. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossL1. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossL2. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMAE. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMAPE. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMCXENT. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMixtureDensity. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)This method returns the gradient of the cost function with respect to the output from the previous layer.INDArrayLossMSE. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMSLE. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMultiLabel. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossPoisson. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossSparseMCXENT. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossSquaredHinge. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossWasserstein. computeGradient(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)Pair<Double,INDArray>LossBinaryXENT. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossCosineProximity. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossFMeasure. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossHinge. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossKLD. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossL1. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossL2. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossMAPE. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossMCXENT. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossMixtureDensity. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossMSLE. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossMultiLabel. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossPoisson. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossSparseMCXENT. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossSquaredHinge. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Pair<Double,INDArray>LossWasserstein. computeGradientAndScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)doubleLossBinaryXENT. computeScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)doubleLossCosineProximity. computeScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)doubleLossFMeasure. computeScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)doubleLossHinge. computeScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)doubleLossKLD. computeScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)doubleLossL1. computeScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)doubleLossL2. computeScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)doubleLossMAE. computeScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)doubleLossMAPE. computeScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)doubleLossMCXENT. computeScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)doubleLossMixtureDensity. computeScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)Computes the aggregate score as a sum of all of the individual scores of each of the labels against each of the outputs of the network.doubleLossMSE. computeScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)doubleLossMSLE. computeScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)doubleLossMultiLabel. computeScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)doubleLossPoisson. computeScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)doubleLossSparseMCXENT. computeScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)doubleLossSquaredHinge. computeScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)doubleLossWasserstein. computeScore(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask, boolean average)INDArrayLossBinaryXENT. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossCosineProximity. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossFMeasure. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossHinge. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossKLD. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossL1. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossL2. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMAE. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMAPE. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMCXENT. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMixtureDensity. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)This method returns the score for each of the given outputs against the given set of labels.INDArrayLossMSE. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMSLE. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMultiLabel. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossPoisson. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossSparseMCXENT. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossSquaredHinge. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossWasserstein. computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)LossMixtureDensity.MixtureDensityComponentsLossMixtureDensity. extractComponents(INDArray output)INDArrayLossCosineProximity. scoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossHinge. scoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossL1. scoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)protected INDArrayLossL2. scoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMAPE. scoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)protected INDArrayLossMCXENT. scoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMSLE. scoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossMultiLabel. scoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossPoisson. scoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)INDArrayLossSquaredHinge. scoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)protected INDArrayLossSparseMCXENT. sparseScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask)Constructors in org.nd4j.linalg.lossfunctions.impl with parameters of type INDArray Constructor Description LossBinaryXENT(double clipEps, INDArray weights)Binary cross entropy where each the output is (optionally) weighted/scaled by a fixed scalar value.LossBinaryXENT(INDArray weights)Binary cross entropy where each the output is (optionally) weighted/scaled by a fixed scalar value.LossL1(INDArray weights)L1 loss function where each the output is (optionally) weighted/scaled by a flags scalar value.LossL2(INDArray weights)L2 loss function where each the output is (optionally) weighted/scaled by a flags scalar value.LossMAE(INDArray weights)Mean Absolute Error loss function where each the output is (optionally) weighted/scaled by a flags scalar value.LossMAPE(INDArray weights)Mean Absolute Percentage Error loss function where each the output is (optionally) weighted/scaled by a flags scalar value.LossMCXENT(double softmaxClipEps, INDArray weights)Multi-Class Cross Entropy loss function where each the output is (optionally) weighted/scaled by a fixed scalar value.LossMCXENT(INDArray weights)Multi-Class Cross Entropy loss function where each the output is (optionally) weighted/scaled by a flags scalar value.LossMSE(INDArray weights)Mean Squared Error loss function where each the output is (optionally) weighted/scaled by a flags scalar value.LossMSLE(INDArray weights)Mean Squared Logarithmic Error loss function where each the output is (optionally) weighted/scaled by a flags scalar value.LossNegativeLogLikelihood(INDArray weights)LossSparseMCXENT(double softmaxClipEps, INDArray weights)Multi-Class Cross Entropy loss function where each the output is (optionally) weighted/scaled by a fixed scalar value.LossSparseMCXENT(INDArray weights)Multi-Class Cross Entropy loss function where each the output is (optionally) weighted/scaled by a flags scalar value. -
Uses of INDArray in org.nd4j.linalg.lossfunctions.serde
Methods in org.nd4j.linalg.lossfunctions.serde that return INDArray Modifier and Type Method Description INDArrayRowVectorDeserializer. deserialize(org.nd4j.shade.jackson.core.JsonParser jsonParser, org.nd4j.shade.jackson.databind.DeserializationContext deserializationContext)Deprecated.Methods in org.nd4j.linalg.lossfunctions.serde with parameters of type INDArray Modifier and Type Method Description voidRowVectorSerializer. serialize(INDArray array, org.nd4j.shade.jackson.core.JsonGenerator jsonGenerator, org.nd4j.shade.jackson.databind.SerializerProvider serializerProvider)Deprecated. -
Uses of INDArray in org.nd4j.linalg.ops.transforms
Methods in org.nd4j.linalg.ops.transforms that return INDArray Modifier and Type Method Description static INDArrayTransforms. abs(INDArray ndArray)Abs functionstatic INDArrayTransforms. abs(INDArray ndArray, boolean dup)Abs functionstatic INDArrayTransforms. acos(INDArray arr)static INDArrayTransforms. acos(INDArray in, boolean copy)static INDArrayTransforms. allCosineDistances(@NonNull INDArray d1, @NonNull INDArray d2, int... dimensions)static INDArrayTransforms. allCosineSimilarities(@NonNull INDArray d1, @NonNull INDArray d2, int... dimensions)static INDArrayTransforms. allEuclideanDistances(@NonNull INDArray d1, @NonNull INDArray d2, int... dimensions)static INDArrayTransforms. allManhattanDistances(@NonNull INDArray d1, @NonNull INDArray d2, int... dimensions)static INDArrayTransforms. and(INDArray x, INDArray y)static INDArrayTransforms. asin(INDArray arr)static INDArrayTransforms. asin(INDArray in, boolean copy)static INDArrayTransforms. atan(INDArray arr)static INDArrayTransforms. atan(INDArray in, boolean copy)static INDArrayTransforms. atan2(@NonNull INDArray x, @NonNull INDArray y)Atan2 operation, new INDArray instance will be returned Note the order of x and y parameters is opposite to that ofMath.atan2(double, double)static INDArrayTransforms. atanh(INDArray in)Sin functionstatic INDArrayTransforms. atanh(INDArray in, boolean copy)Sin functionstatic INDArrayTransforms. ceil(INDArray arr)static INDArrayTransforms. ceil(INDArray in, boolean copy)static INDArrayTransforms. ceiling(INDArray ndArray)Binary matrix of whether the number at a given index is greater thanstatic INDArrayTransforms. ceiling(INDArray ndArray, boolean copyOnOps)Ceiling functionstatic INDArrayTransforms. cos(INDArray in)static INDArrayTransforms. cos(INDArray in, boolean copy)static INDArrayTransforms. cosh(INDArray in)static INDArrayTransforms. cosh(INDArray in, boolean copy)static INDArrayTransforms. cross(INDArray x, INDArray y)static INDArrayTransforms. dot(INDArray x, INDArray y)Dot product, new INDArray instance will be returned.
Note that the Nd4J design is different from Numpy.static INDArrayTransforms. elu(INDArray arr)static INDArrayTransforms. elu(INDArray in, boolean copy)static INDArrayTransforms. eluDerivative(INDArray arr, INDArray grad)static INDArrayTransforms. eluDerivative(INDArray in, INDArray grad, boolean copy)static INDArrayTransforms. eps(INDArray ndArray)static INDArrayTransforms. exp(INDArray ndArray)Run the exp operationstatic INDArrayTransforms. exp(INDArray ndArray, boolean dup)Exp functionstatic INDArrayTransforms. expm1(INDArray ndArray, boolean dup)Elementwise exponential - 1 functionstatic INDArrayTransforms. floor(INDArray ndArray)Binary matrix of whether the number at a given index is greater thanstatic INDArrayTransforms. floor(INDArray ndArray, boolean dup)Floor functionstatic INDArrayTransforms. greaterThanOrEqual(INDArray first, INDArray ndArray)1 if greater than or equal to 0 otherwise (at each element)static INDArrayTransforms. greaterThanOrEqual(INDArray first, INDArray ndArray, boolean dup)Eps functionstatic INDArrayTransforms. hardSigmoid(INDArray arr, boolean dup)static INDArrayTransforms. hardTanh(INDArray ndArray)static INDArrayTransforms. hardTanh(INDArray ndArray, boolean dup)Hard tanhstatic INDArrayTransforms. hardTanhDerivative(INDArray ndArray)static INDArrayTransforms. hardTanhDerivative(INDArray ndArray, boolean dup)Hard tanhstatic INDArrayTransforms. identity(INDArray ndArray)static INDArrayTransforms. identity(INDArray ndArray, boolean dup)Identity functionstatic INDArrayTransforms. isMax(INDArray input)static INDArrayTransforms. isMax(INDArray input, DataType dataType)static INDArrayTransforms. isMax(INDArray input, INDArray output)static INDArrayTransforms. leakyRelu(INDArray arr)static INDArrayTransforms. leakyRelu(INDArray in, boolean copy)static INDArrayTransforms. leakyRelu(INDArray arr, double cutoff)static INDArrayTransforms. leakyRelu(INDArray in, double cutoff, boolean copy)static INDArrayTransforms. leakyReluDerivative(INDArray arr, double cutoff)static INDArrayTransforms. leakyReluDerivative(INDArray in, double cutoff, boolean copy)static INDArrayTransforms. lessThanOrEqual(INDArray first, INDArray ndArray)1 if less than or equal to 0 otherwise (at each element)static INDArrayTransforms. lessThanOrEqual(INDArray first, INDArray ndArray, boolean dup)Eps functionstatic INDArrayTransforms. log(INDArray ndArray)static INDArrayTransforms. log(INDArray ndArray, boolean dup)Log functionstatic INDArrayTransforms. log(INDArray ndArray, double base)Log on arbitrary basestatic INDArrayTransforms. log(INDArray ndArray, double base, boolean duplicate)Log on arbitrary basestatic INDArrayTransforms. log1p(INDArray ndArray, boolean dup)Log of x + 1 functionstatic INDArrayTransforms. max(INDArray ndArray, double k)Maximum function with a scalarstatic INDArrayTransforms. max(INDArray ndArray, double k, boolean dup)Maximum function with a scalarstatic INDArrayTransforms. max(INDArray first, INDArray second)Element wise maximum function between 2 INDArraysstatic INDArrayTransforms. max(INDArray first, INDArray second, boolean dup)Element wise maximum function between 2 INDArraysstatic INDArrayTransforms. min(INDArray ndArray, double k)Maximum function with a scalarstatic INDArrayTransforms. min(INDArray ndArray, double k, boolean dup)Minimum function with a scalarstatic INDArrayTransforms. min(INDArray first, INDArray second)Element wise minimum function between 2 INDArraysstatic INDArrayTransforms. min(INDArray first, INDArray second, boolean dup)Element wise minimum function between 2 INDArraysstatic INDArrayTransforms. mpow(INDArray in, int n, boolean dup)Raises a square matrix to a power n, which can be positive, negative, or zero.static INDArrayTransforms. neg(INDArray ndArray)Returns the negative of an ndarraystatic INDArrayTransforms. neg(INDArray ndArray, boolean dup)Negativestatic INDArrayTransforms. normalizeZeroMeanAndUnitVariance(INDArray toNormalize)Normalize data to zero mean and unit variance substract by the mean and divide by the standard deviationstatic INDArrayTransforms. not(INDArray x)static INDArrayTransforms. or(INDArray x, INDArray y)static INDArrayTransforms. pow(INDArray ndArray, Number power)Pow functionstatic INDArrayTransforms. pow(INDArray ndArray, Number power, boolean dup)Pow functionstatic INDArrayTransforms. pow(INDArray ndArray, INDArray power)Element-wise power function - x^y, performed element-wise.static INDArrayTransforms. pow(INDArray ndArray, INDArray power, boolean dup)Element-wise power function - x^y, performed element-wisestatic INDArrayTransforms. relu(INDArray arr)static INDArrayTransforms. relu(INDArray in, boolean copy)static INDArrayTransforms. relu6(INDArray arr)static INDArrayTransforms. relu6(INDArray in, boolean copy)static INDArrayTransforms. reverse(INDArray x, boolean dup)static INDArrayTransforms. round(INDArray ndArray)Rounding functionstatic INDArrayTransforms. round(INDArray ndArray, boolean dup)Rounding functionstatic INDArrayTransforms. sigmoid(INDArray ndArray)Sigmoid functionstatic INDArrayTransforms. sigmoid(INDArray ndArray, boolean dup)Sigmoid functionstatic INDArrayTransforms. sigmoidDerivative(INDArray ndArray)Sigmoid functionstatic INDArrayTransforms. sigmoidDerivative(INDArray ndArray, boolean dup)Sigmoid functionstatic INDArrayTransforms. sign(INDArray toSign)Signum function of this ndarraystatic INDArrayTransforms. sign(INDArray toSign, boolean dup)Signum function of this ndarraystatic INDArrayTransforms. sin(INDArray in)Sin functionstatic INDArrayTransforms. sin(INDArray in, boolean copy)Sin functionstatic INDArrayTransforms. sinh(INDArray in)Sinh functionstatic INDArrayTransforms. sinh(INDArray in, boolean copy)Sinh functionstatic INDArrayTransforms. softmax(INDArray arr)static INDArrayTransforms. softmax(INDArray in, boolean copy)static INDArrayTransforms. softPlus(INDArray arr)static INDArrayTransforms. softPlus(INDArray in, boolean copy)static INDArrayTransforms. softsign(INDArray arr)static INDArrayTransforms. softsign(INDArray in, boolean copy)static INDArrayTransforms. softsignDerivative(INDArray arr)static INDArrayTransforms. softsignDerivative(INDArray in, boolean copy)static INDArrayTransforms. sqrt(INDArray ndArray)Sqrt functionstatic INDArrayTransforms. sqrt(INDArray ndArray, boolean dup)Sqrt functionstatic INDArrayTransforms. stabilize(INDArray ndArray, double k)static INDArrayTransforms. stabilize(INDArray ndArray, double k, boolean dup)Stabilize to be within a range of kstatic INDArrayTransforms. step(INDArray arr)static INDArrayTransforms. step(INDArray in, boolean copy)static INDArrayTransforms. tan(INDArray ndArray)Element-wise tan function.static INDArrayTransforms. tan(INDArray ndArray, boolean dup)Element-wise tan function.static INDArrayTransforms. tanh(INDArray ndArray)Tanh functionstatic INDArrayTransforms. tanh(INDArray ndArray, boolean dup)Tanh functionstatic INDArrayTransforms. timesOneMinus(INDArray in, boolean copy)out = in * (1-in)static INDArrayTransforms. unitVec(INDArray toScale)Scale by 1 / norm2 of the matrixstatic INDArrayTransforms. xor(INDArray x, INDArray y)Methods in org.nd4j.linalg.ops.transforms with parameters of type INDArray Modifier and Type Method Description static INDArrayTransforms. abs(INDArray ndArray)Abs functionstatic INDArrayTransforms. abs(INDArray ndArray, boolean dup)Abs functionstatic INDArrayTransforms. acos(INDArray arr)static INDArrayTransforms. acos(INDArray in, boolean copy)static INDArrayTransforms. allCosineDistances(@NonNull INDArray d1, @NonNull INDArray d2, int... dimensions)static INDArrayTransforms. allCosineSimilarities(@NonNull INDArray d1, @NonNull INDArray d2, int... dimensions)static INDArrayTransforms. allEuclideanDistances(@NonNull INDArray d1, @NonNull INDArray d2, int... dimensions)static INDArrayTransforms. allManhattanDistances(@NonNull INDArray d1, @NonNull INDArray d2, int... dimensions)static INDArrayTransforms. and(INDArray x, INDArray y)static INDArrayTransforms. asin(INDArray arr)static INDArrayTransforms. asin(INDArray in, boolean copy)static INDArrayTransforms. atan(INDArray arr)static INDArrayTransforms. atan(INDArray in, boolean copy)static INDArrayTransforms. atan2(@NonNull INDArray x, @NonNull INDArray y)Atan2 operation, new INDArray instance will be returned Note the order of x and y parameters is opposite to that ofMath.atan2(double, double)static INDArrayTransforms. atanh(INDArray in)Sin functionstatic INDArrayTransforms. atanh(INDArray in, boolean copy)Sin functionprotected static long[]Transforms. broadcastResultShape(INDArray first, INDArray second)static INDArrayTransforms. ceil(INDArray arr)static INDArrayTransforms. ceil(INDArray in, boolean copy)static INDArrayTransforms. ceiling(INDArray ndArray)Binary matrix of whether the number at a given index is greater thanstatic INDArrayTransforms. ceiling(INDArray ndArray, boolean copyOnOps)Ceiling functionstatic INDArrayTransforms. cos(INDArray in)static INDArrayTransforms. cos(INDArray in, boolean copy)static INDArrayTransforms. cosh(INDArray in)static INDArrayTransforms. cosh(INDArray in, boolean copy)static doubleTransforms. cosineDistance(@NonNull INDArray d1, @NonNull INDArray d2)static doubleTransforms. cosineSim(@NonNull INDArray d1, @NonNull INDArray d2)Cosine similaritystatic INDArrayTransforms. cross(INDArray x, INDArray y)static INDArrayTransforms. dot(INDArray x, INDArray y)Dot product, new INDArray instance will be returned.
Note that the Nd4J design is different from Numpy.static INDArrayTransforms. elu(INDArray arr)static INDArrayTransforms. elu(INDArray in, boolean copy)static INDArrayTransforms. eluDerivative(INDArray arr, INDArray grad)static INDArrayTransforms. eluDerivative(INDArray in, INDArray grad, boolean copy)static INDArrayTransforms. eps(INDArray ndArray)static doubleTransforms. euclideanDistance(@NonNull INDArray d1, @NonNull INDArray d2)static INDArrayTransforms. exp(INDArray ndArray)Run the exp operationstatic INDArrayTransforms. exp(INDArray ndArray, boolean dup)Exp functionstatic INDArrayTransforms. expm1(INDArray ndArray, boolean dup)Elementwise exponential - 1 functionstatic INDArrayTransforms. floor(INDArray ndArray)Binary matrix of whether the number at a given index is greater thanstatic INDArrayTransforms. floor(INDArray ndArray, boolean dup)Floor functionstatic INDArrayTransforms. greaterThanOrEqual(INDArray first, INDArray ndArray)1 if greater than or equal to 0 otherwise (at each element)static INDArrayTransforms. greaterThanOrEqual(INDArray first, INDArray ndArray, boolean dup)Eps functionstatic doubleTransforms. hammingDistance(@NonNull INDArray d1, @NonNull INDArray d2)static INDArrayTransforms. hardSigmoid(INDArray arr, boolean dup)static INDArrayTransforms. hardTanh(INDArray ndArray)static INDArrayTransforms. hardTanh(INDArray ndArray, boolean dup)Hard tanhstatic INDArrayTransforms. hardTanhDerivative(INDArray ndArray)static INDArrayTransforms. hardTanhDerivative(INDArray ndArray, boolean dup)Hard tanhstatic INDArrayTransforms. identity(INDArray ndArray)static INDArrayTransforms. identity(INDArray ndArray, boolean dup)Identity functionstatic INDArrayTransforms. isMax(INDArray input)static INDArrayTransforms. isMax(INDArray input, DataType dataType)static INDArrayTransforms. isMax(INDArray input, INDArray output)static doubleTransforms. jaccardDistance(@NonNull INDArray d1, @NonNull INDArray d2)static INDArrayTransforms. leakyRelu(INDArray arr)static INDArrayTransforms. leakyRelu(INDArray in, boolean copy)static INDArrayTransforms. leakyRelu(INDArray arr, double cutoff)static INDArrayTransforms. leakyRelu(INDArray in, double cutoff, boolean copy)static INDArrayTransforms. leakyReluDerivative(INDArray arr, double cutoff)static INDArrayTransforms. leakyReluDerivative(INDArray in, double cutoff, boolean copy)static INDArrayTransforms. lessThanOrEqual(INDArray first, INDArray ndArray)1 if less than or equal to 0 otherwise (at each element)static INDArrayTransforms. lessThanOrEqual(INDArray first, INDArray ndArray, boolean dup)Eps functionstatic INDArrayTransforms. log(INDArray ndArray)static INDArrayTransforms. log(INDArray ndArray, boolean dup)Log functionstatic INDArrayTransforms. log(INDArray ndArray, double base)Log on arbitrary basestatic INDArrayTransforms. log(INDArray ndArray, double base, boolean duplicate)Log on arbitrary basestatic INDArrayTransforms. log1p(INDArray ndArray, boolean dup)Log of x + 1 functionstatic doubleTransforms. manhattanDistance(@NonNull INDArray d1, @NonNull INDArray d2)static INDArrayTransforms. max(INDArray ndArray, double k)Maximum function with a scalarstatic INDArrayTransforms. max(INDArray ndArray, double k, boolean dup)Maximum function with a scalarstatic INDArrayTransforms. max(INDArray first, INDArray second)Element wise maximum function between 2 INDArraysstatic INDArrayTransforms. max(INDArray first, INDArray second, boolean dup)Element wise maximum function between 2 INDArraysstatic INDArrayTransforms. min(INDArray ndArray, double k)Maximum function with a scalarstatic INDArrayTransforms. min(INDArray ndArray, double k, boolean dup)Minimum function with a scalarstatic INDArrayTransforms. min(INDArray first, INDArray second)Element wise minimum function between 2 INDArraysstatic INDArrayTransforms. min(INDArray first, INDArray second, boolean dup)Element wise minimum function between 2 INDArraysstatic INDArrayTransforms. mpow(INDArray in, int n, boolean dup)Raises a square matrix to a power n, which can be positive, negative, or zero.static INDArrayTransforms. neg(INDArray ndArray)Returns the negative of an ndarraystatic INDArrayTransforms. neg(INDArray ndArray, boolean dup)Negativestatic INDArrayTransforms. normalizeZeroMeanAndUnitVariance(INDArray toNormalize)Normalize data to zero mean and unit variance substract by the mean and divide by the standard deviationstatic INDArrayTransforms. not(INDArray x)static INDArrayTransforms. or(INDArray x, INDArray y)static INDArrayTransforms. pow(INDArray ndArray, Number power)Pow functionstatic INDArrayTransforms. pow(INDArray ndArray, Number power, boolean dup)Pow functionstatic INDArrayTransforms. pow(INDArray ndArray, INDArray power)Element-wise power function - x^y, performed element-wise.static INDArrayTransforms. pow(INDArray ndArray, INDArray power, boolean dup)Element-wise power function - x^y, performed element-wisestatic INDArrayTransforms. relu(INDArray arr)static INDArrayTransforms. relu(INDArray in, boolean copy)static INDArrayTransforms. relu6(INDArray arr)static INDArrayTransforms. relu6(INDArray in, boolean copy)static INDArrayTransforms. reverse(INDArray x, boolean dup)static INDArrayTransforms. round(INDArray ndArray)Rounding functionstatic INDArrayTransforms. round(INDArray ndArray, boolean dup)Rounding functionstatic INDArrayTransforms. sigmoid(INDArray ndArray)Sigmoid functionstatic INDArrayTransforms. sigmoid(INDArray ndArray, boolean dup)Sigmoid functionstatic INDArrayTransforms. sigmoidDerivative(INDArray ndArray)Sigmoid functionstatic INDArrayTransforms. sigmoidDerivative(INDArray ndArray, boolean dup)Sigmoid functionstatic INDArrayTransforms. sign(INDArray toSign)Signum function of this ndarraystatic INDArrayTransforms. sign(INDArray toSign, boolean dup)Signum function of this ndarraystatic INDArrayTransforms. sin(INDArray in)Sin functionstatic INDArrayTransforms. sin(INDArray in, boolean copy)Sin functionstatic INDArrayTransforms. sinh(INDArray in)Sinh functionstatic INDArrayTransforms. sinh(INDArray in, boolean copy)Sinh functionstatic INDArrayTransforms. softmax(INDArray arr)static INDArrayTransforms. softmax(INDArray in, boolean copy)static INDArrayTransforms. softPlus(INDArray arr)static INDArrayTransforms. softPlus(INDArray in, boolean copy)static INDArrayTransforms. softsign(INDArray arr)static INDArrayTransforms. softsign(INDArray in, boolean copy)static INDArrayTransforms. softsignDerivative(INDArray arr)static INDArrayTransforms. softsignDerivative(INDArray in, boolean copy)static INDArrayTransforms. sqrt(INDArray ndArray)Sqrt functionstatic INDArrayTransforms. sqrt(INDArray ndArray, boolean dup)Sqrt functionstatic INDArrayTransforms. stabilize(INDArray ndArray, double k)static INDArrayTransforms. stabilize(INDArray ndArray, double k, boolean dup)Stabilize to be within a range of kstatic INDArrayTransforms. step(INDArray arr)static INDArrayTransforms. step(INDArray in, boolean copy)static INDArrayTransforms. tan(INDArray ndArray)Element-wise tan function.static INDArrayTransforms. tan(INDArray ndArray, boolean dup)Element-wise tan function.static INDArrayTransforms. tanh(INDArray ndArray)Tanh functionstatic INDArrayTransforms. tanh(INDArray ndArray, boolean dup)Tanh functionstatic INDArrayTransforms. timesOneMinus(INDArray in, boolean copy)out = in * (1-in)static INDArrayTransforms. unitVec(INDArray toScale)Scale by 1 / norm2 of the matrixstatic INDArrayTransforms. xor(INDArray x, INDArray y) -
Uses of INDArray in org.nd4j.linalg.profiler
Methods in org.nd4j.linalg.profiler with parameters of type INDArray Modifier and Type Method Description voidOpProfiler. processBlasCall(boolean isGemm, INDArray... operands)OpProfiler.PenaltyCause[]OpProfiler. processOperands(INDArray... operands)This method checks for something somewhereOpProfiler.PenaltyCause[]OpProfiler. processOperands(INDArray x, INDArray y)OpProfiler.PenaltyCause[]OpProfiler. processOperands(INDArray x, INDArray y, INDArray z)StringOpProfiler. processOrders(INDArray... operands) -
Uses of INDArray in org.nd4j.linalg.string
Methods in org.nd4j.linalg.string with parameters of type INDArray Modifier and Type Method Description StringNDArrayStrings. format(INDArray arr)StringNDArrayStrings. format(INDArray arr, boolean summarize)Format the given ndarray as a string -
Uses of INDArray in org.nd4j.linalg.util
Fields in org.nd4j.linalg.util declared as INDArray Modifier and Type Field Description protected INDArrayDeviceLocal. delayedArrayMethods in org.nd4j.linalg.util that return INDArray Modifier and Type Method Description INDArrayDeviceLocalNDArray. get()This method returns object local to current deviceIdstatic INDArrayNDArrayUtil. toNDArray(int[] nums)Deprecated.static INDArrayNDArrayUtil. toNDArray(int[][] nums)Deprecated.static INDArrayNDArrayUtil. toNDArray(long[] nums)Deprecated.static INDArrayFeatureUtil. toOutcomeMatrix(int[] index, long numOutcomes)Creates an out come vector from the specified inputsstatic INDArrayFeatureUtil. toOutcomeVector(long index, long numOutcomes)Creates an out come vector from the specified inputsMethods in org.nd4j.linalg.util with parameters of type INDArray Modifier and Type Method Description BooleanND4JTestUtils.EqualsFn. apply(INDArray i1, INDArray i2)BooleanND4JTestUtils.EqualsWithEpsFn. apply(INDArray i1, INDArray i2)static voidLinAlgExceptions. assertColumns(INDArray n, INDArray n2)static voidLinAlgExceptions. assertMatrix(INDArray arr)static voidLinAlgExceptions. assertMatrix(INDArray... arr)static voidLinAlgExceptions. assertMultiplies(INDArray nd1, INDArray nd2)Asserts matrix multiply rules (columns of left == rows of right or rows of left == columns of right)static voidLinAlgExceptions. assertRows(INDArray n, INDArray n2)static voidLinAlgExceptions. assertSameLength(INDArray x, INDArray z)Asserts both arrays be the same lengthstatic voidLinAlgExceptions. assertSameLength(INDArray x, INDArray y, INDArray z)static voidLinAlgExceptions. assertSameShape(INDArray n, INDArray n2)static voidLinAlgExceptions. assertSameShape(INDArray x, INDArray y, INDArray z)static voidLinAlgExceptions. assertValidNum(INDArray n)static voidLinAlgExceptions. assertVector(INDArray arr)static voidLinAlgExceptions. assertVector(INDArray... arr)voidDeviceLocalNDArray. broadcast(INDArray array)This method duplicates array, and stores it to all devices PLEASE NOTE: this method is NOT atomic, so you must be sure no other threads are using this instance during the updatestatic longNDArrayMath. lengthPerSlice(INDArray arr)Return the length of a slicestatic longNDArrayMath. lengthPerSlice(INDArray arr, int... dimension)The number of elements in a slice along a set of dimensionsstatic intNDArrayMath. mapIndexOntoTensor(int index, INDArray arr, int... rank)This maps an index of a vector on to a vector in the matrix that can be used for indexing in to a tensorstatic longNDArrayMath. mapIndexOntoVector(int index, INDArray arr)This maps an index of a vector on to a vector in the matrix that can be used for indexing in to a tensorstatic longNDArrayMath. matricesPerSlice(INDArray arr)The number of vectors in each slice of an ndarray.static voidFeatureUtil. normalizeMatrix(INDArray toNormalize)static longNDArrayMath. numVectors(INDArray arr)Return the number of vectors for an array the number of vectors for an arraystatic longNDArrayMath. offsetForSlice(INDArray arr, int slice)Compute the offset for a given slicestatic voidFeatureUtil. scaleByMax(INDArray toScale)Divides each row by its maxstatic voidFeatureUtil. scaleMinMax(double min, double max, INDArray toScale)Scales the ndarray columns to the given min/max valuesvoidDataSetUtils. showINDArray(int mtLv, String itemCode, INDArray INDA, int digits, int r_End_I, int c_End_I)showINDArray
public void showINDArray( int mtLv, String itemCode, INDArray INDA,
int digits, int r_End_I, int c_End_I )
Shows content of INDArray.
Shows first rows and than columns.voidDataSetUtils. showINDArray(int mtLv, String itemCode, INDArray INDA, int digits, int r_End_I, int c_End_I, boolean turned)showINDArray
public void showINDArray( int mtLv, String itemCode, INDArray INDA,
int digits, int r_End_I, int c_End_I, boolean turned )
Shows content of INDArray.
If turned is false shows first rows and than columns.
If turned is true shows first columns and than rows.static longNDArrayMath. sliceOffsetForTensor(int index, INDArray arr, int[] tensorShape)calculates the offset for a tensorstatic longNDArrayMath. sliceOffsetForTensor(int index, INDArray arr, long[] tensorShape)static longNDArrayMath. tensorsPerSlice(INDArray arr, int[] tensorShape)Computes the tensors per slice given a tensor shape and arraystatic int[]NDArrayUtil. toInts(INDArray n)Deprecated.static long[]NDArrayUtil. toLongs(INDArray n)Deprecated.voidDeviceLocalNDArray. update(@NonNull INDArray array)This method updates PLEASE NOTE: this method is NOT atomic, so you must be sure no other threads are using this instance during the updatestatic longNDArrayMath. vectorsPerSlice(INDArray arr)The number of vectors in each slice of an ndarray.static longNDArrayMath. vectorsPerSlice(INDArray arr, int... rank)The number of vectors in each slice of an ndarray.Method parameters in org.nd4j.linalg.util with type arguments of type INDArray Modifier and Type Method Description static ND4JTestUtils.ComparisonResultND4JTestUtils. validateSerializedArrays(File dir1, File dir2, boolean recursive, BiFunction<INDArray,INDArray,Boolean> evalFn)Scan the specified directories for matching files (i.e., same path relative to their respective root directories) and compare the contents using a provided function.
Assumes the saved files represent INDArrays saved withNd4j.saveBinary(INDArray, File)static ND4JTestUtils.ComparisonResultND4JTestUtils. validateSerializedArrays(File dir1, File dir2, boolean recursive, BiFunction<INDArray,INDArray,Boolean> evalFn)Scan the specified directories for matching files (i.e., same path relative to their respective root directories) and compare the contents using a provided function.
Assumes the saved files represent INDArrays saved withNd4j.saveBinary(INDArray, File)Constructors in org.nd4j.linalg.util with parameters of type INDArray Constructor Description DeviceLocalNDArray(INDArray array)DeviceLocalNDArray(INDArray array, boolean delayedMode) -
Uses of INDArray in org.nd4j.linalg.workspace
Methods in org.nd4j.linalg.workspace that return INDArray Modifier and Type Method Description INDArrayBaseWorkspaceMgr. castTo(T arrayType, @NonNull DataType dataType, @NonNull INDArray toCast, boolean dupIfCorrectType)INDArrayWorkspaceMgr. castTo(T arrayType, @NonNull DataType dataType, @NonNull INDArray toCast, boolean dupIfCorrectType)Cast the specified array to the specified datatype.
If the array is already the correct type, the bahaviour depends on the 'dupIfCorrectType' argument.
dupIfCorrectType = false && toCast.dataType() == dataType: return input array as-is (unless workspace is wrong)
dupIfCorrectType = true && toCast.dataType() == dataType: duplicate the array into the specified workspaceINDArrayBaseWorkspaceMgr. create(T arrayType, @NonNull DataType dataType, @lombok.NonNull long... shape)INDArrayBaseWorkspaceMgr. create(T arrayType, @NonNull DataType dataType, @lombok.NonNull long[] shape, @lombok.NonNull char order)INDArrayWorkspaceMgr. create(T arrayType, DataType dataType, long... shape)Create an array in the specified array type's workspace (or detached if none is specified).INDArrayWorkspaceMgr. create(T arrayType, DataType dataType, long[] shape, char ordering)Create an array in the specified array type's workspace (or detached if none is specified).INDArrayBaseWorkspaceMgr. createUninitialized(T arrayType, @NonNull DataType dataType, @lombok.NonNull long[] shape, char order)INDArrayBaseWorkspaceMgr. createUninitialized(T arrayType, DataType dataType, long... shape)INDArrayWorkspaceMgr. createUninitialized(T arrayType, DataType dataType, long... shape)Create an uninitialized array in the specified array type's workspace (or detached if none is specified).INDArrayWorkspaceMgr. createUninitialized(T arrayType, DataType dataType, long[] shape, char order)Create an uninitialized array in the specified array type's workspace (or detached if none is specified).INDArrayBaseWorkspaceMgr. dup(T arrayType, @NonNull INDArray toDup)INDArrayBaseWorkspaceMgr. dup(T arrayType, @NonNull INDArray toDup, char order)INDArrayWorkspaceMgr. dup(T arrayType, @NonNull INDArray toDup)Duplicate the array, where the array is put into the specified array type's workspace (if applicable)INDArrayWorkspaceMgr. dup(T arrayType, INDArray toDup, char order)Duplicate the array, where the array is put into the specified array type's workspace (if applicable)INDArrayBaseWorkspaceMgr. leverageTo(T arrayType, @NonNull INDArray array)INDArrayWorkspaceMgr. leverageTo(T toWorkspace, INDArray array)Leverage the array to the specified array type's workspace (or detach if required).INDArrayBaseWorkspaceMgr. validateArrayLocation(T arrayType, @NonNull INDArray array, boolean migrateIfInvalid, boolean exceptionIfDetached)INDArrayWorkspaceMgr. validateArrayLocation(T arrayType, INDArray array, boolean migrateIfInvalid, boolean exceptionIfDetached)Validate that the specified array type is actually in the workspace it's supposed to be inMethods in org.nd4j.linalg.workspace with parameters of type INDArray Modifier and Type Method Description static voidWorkspaceUtils. assertValidArray(INDArray array, String msg)Assert that the specified array is valid, in terms of workspaces: i.e., if it is attached (and not in a circular workspace), assert that the workspace is open, and that the data is not from an old generation.INDArrayBaseWorkspaceMgr. castTo(T arrayType, @NonNull DataType dataType, @NonNull INDArray toCast, boolean dupIfCorrectType)INDArrayWorkspaceMgr. castTo(T arrayType, @NonNull DataType dataType, @NonNull INDArray toCast, boolean dupIfCorrectType)Cast the specified array to the specified datatype.
If the array is already the correct type, the bahaviour depends on the 'dupIfCorrectType' argument.
dupIfCorrectType = false && toCast.dataType() == dataType: return input array as-is (unless workspace is wrong)
dupIfCorrectType = true && toCast.dataType() == dataType: duplicate the array into the specified workspaceINDArrayBaseWorkspaceMgr. dup(T arrayType, @NonNull INDArray toDup)INDArrayBaseWorkspaceMgr. dup(T arrayType, @NonNull INDArray toDup, char order)INDArrayWorkspaceMgr. dup(T arrayType, @NonNull INDArray toDup)Duplicate the array, where the array is put into the specified array type's workspace (if applicable)INDArrayWorkspaceMgr. dup(T arrayType, INDArray toDup, char order)Duplicate the array, where the array is put into the specified array type's workspace (if applicable)INDArrayBaseWorkspaceMgr. leverageTo(T arrayType, @NonNull INDArray array)INDArrayWorkspaceMgr. leverageTo(T toWorkspace, INDArray array)Leverage the array to the specified array type's workspace (or detach if required).INDArrayBaseWorkspaceMgr. validateArrayLocation(T arrayType, @NonNull INDArray array, boolean migrateIfInvalid, boolean exceptionIfDetached)INDArrayWorkspaceMgr. validateArrayLocation(T arrayType, INDArray array, boolean migrateIfInvalid, boolean exceptionIfDetached)Validate that the specified array type is actually in the workspace it's supposed to be in -
Uses of INDArray in org.nd4j.list
Fields in org.nd4j.list declared as INDArray Modifier and Type Field Description protected INDArrayBaseNDArrayList. containerMethods in org.nd4j.list that return INDArray Modifier and Type Method Description INDArrayBaseNDArrayList. array()Get a view of the underlying array relative to the size of the actual array.INDArrayNDArrayList. array()Get a view of the underlying array relative to the size of the actual array.Constructors in org.nd4j.list with parameters of type INDArray Constructor Description NDArrayList(@NonNull INDArray container)Specify the underlying ndarray for this list.NDArrayList(@NonNull INDArray container, int size)Specify the underlying ndarray for this list. -
Uses of INDArray in org.nd4j.serde.base64
Methods in org.nd4j.serde.base64 that return INDArray Modifier and Type Method Description static INDArrayNd4jBase64. fromBase64(String base64)Create an ndarray from a base 64 representationMethods in org.nd4j.serde.base64 with parameters of type INDArray Modifier and Type Method Description static StringNd4jBase64. base64String(INDArray arr)Returns an ndarray as base 64 -
Uses of INDArray in org.nd4j.serde.binary
Methods in org.nd4j.serde.binary that return INDArray Modifier and Type Method Description static INDArrayBinarySerde. readFromDisk(File readFrom)Read an ndarray from diskstatic INDArrayBinarySerde. toArray(ByteBuffer buffer)Create an ndarray from the unsafe bufferstatic INDArrayBinarySerde. toArray(ByteBuffer buffer, int offset)Create an ndarray from the unsafe bufferMethods in org.nd4j.serde.binary that return types with arguments of type INDArray Modifier and Type Method Description protected static Pair<INDArray,ByteBuffer>BinarySerde. toArrayAndByteBuffer(ByteBuffer buffer, int offset)Create an ndarray and existing bytebufferMethods in org.nd4j.serde.binary with parameters of type INDArray Modifier and Type Method Description static intBinarySerde. byteBufferSizeFor(INDArray arr)Returns the byte buffer size for the given ndarray.static voidBinarySerde. doByteBufferPutCompressed(INDArray arr, ByteBuffer allocated, boolean rewind)Setup the given byte buffer for serialization (note that this is for compressed INDArrays) 4 bytes for rank 4 bytes for data opType shape information codec information data opTypestatic voidBinarySerde. doByteBufferPutUnCompressed(INDArray arr, ByteBuffer allocated, boolean rewind)Setup the given byte buffer for serialization (note that this is for uncompressed INDArrays) 4 bytes int for rank 4 bytes for data opType shape buffer data bufferstatic ByteBufferBinarySerde. toByteBuffer(INDArray arr)Convert an ndarray to an unsafe buffer for use by aeronstatic voidBinarySerde. writeArrayToDisk(INDArray arr, File toWrite)Write an ndarray to disk in binary formatstatic voidBinarySerde. writeArrayToOutputStream(INDArray arr, OutputStream outputStream)Write an array to an output stream. -
Uses of INDArray in org.nd4j.serde.jackson.shaded
Methods in org.nd4j.serde.jackson.shaded that return INDArray Modifier and Type Method Description INDArrayNDArrayDeSerializer. deserialize(org.nd4j.shade.jackson.core.JsonParser jp, org.nd4j.shade.jackson.databind.DeserializationContext deserializationContext)INDArrayNDArrayTextDeSerializer. deserialize(org.nd4j.shade.jackson.core.JsonParser jp, org.nd4j.shade.jackson.databind.DeserializationContext deserializationContext)INDArrayNDArrayTextDeSerializer. deserialize(org.nd4j.shade.jackson.databind.JsonNode n)Methods in org.nd4j.serde.jackson.shaded with parameters of type INDArray Modifier and Type Method Description voidNDArraySerializer. serialize(INDArray indArray, org.nd4j.shade.jackson.core.JsonGenerator jsonGenerator, org.nd4j.shade.jackson.databind.SerializerProvider serializerProvider)voidNDArrayTextSerializer. serialize(INDArray arr, org.nd4j.shade.jackson.core.JsonGenerator jg, org.nd4j.shade.jackson.databind.SerializerProvider serializerProvider) -
Uses of INDArray in org.nd4j.weightinit
Methods in org.nd4j.weightinit that return INDArray Modifier and Type Method Description INDArrayBaseWeightInitScheme. create(long[] shape, INDArray paramsView)INDArrayBaseWeightInitScheme. create(DataType dataType, long... shape)INDArrayWeightInitScheme. create(long[] shape, INDArray paramsView)Create the arrayINDArrayWeightInitScheme. create(DataType dataType, long... shape)Create the arrayabstract INDArrayBaseWeightInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)protected INDArrayBaseWeightInitScheme. handleParamsView(INDArray outputArray, INDArray paramView)Methods in org.nd4j.weightinit with parameters of type INDArray Modifier and Type Method Description INDArrayBaseWeightInitScheme. create(long[] shape, INDArray paramsView)INDArrayWeightInitScheme. create(long[] shape, INDArray paramsView)Create the arrayabstract INDArrayBaseWeightInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)protected INDArrayBaseWeightInitScheme. handleParamsView(INDArray outputArray, INDArray paramView) -
Uses of INDArray in org.nd4j.weightinit.impl
Methods in org.nd4j.weightinit.impl that return INDArray Modifier and Type Method Description INDArrayNDArraySupplierInitScheme. create(long[] shape, INDArray paramsView)INDArrayNDArraySupplierInitScheme. create(DataType dataType, long[] shape)INDArrayConstantInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayDistributionInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayIdentityInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayLecunUniformInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayOneInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayReluInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayReluUniformInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArraySigmoidUniformInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayUniformInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayVarScalingNormalFanAvgInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayVarScalingNormalFanInInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayVarScalingNormalFanOutInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayVarScalingNormalUniformFanInInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayVarScalingNormalUniformFanOutInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayVarScalingUniformFanAvgInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayXavierFanInInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayXavierInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayXavierUniformInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayZeroInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayNDArraySupplierInitScheme.NDArraySupplier. getArr()An array proxy method.Methods in org.nd4j.weightinit.impl with parameters of type INDArray Modifier and Type Method Description INDArrayNDArraySupplierInitScheme. create(long[] shape, INDArray paramsView)INDArrayConstantInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayDistributionInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayIdentityInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayLecunUniformInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayOneInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayReluInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayReluUniformInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArraySigmoidUniformInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayUniformInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayVarScalingNormalFanAvgInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayVarScalingNormalFanInInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayVarScalingNormalFanOutInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayVarScalingNormalUniformFanInInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayVarScalingNormalUniformFanOutInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayVarScalingUniformFanAvgInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayXavierFanInInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayXavierInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayXavierUniformInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)INDArrayZeroInitScheme. doCreate(DataType dataType, long[] shape, INDArray paramsView)Constructors in org.nd4j.weightinit.impl with parameters of type INDArray Constructor Description NDArraySupplierInitScheme(INDArray arr)
-