Available Methods
- create ( )
- rand ( )
- exec ( )
- zeros ( )
- ones ( )
- linspace ( )
- createFromArray ( )
- createUninitialized ( )
- scalar ( )
- createBuffer ( )
- dataType ( )
- read ( )
- setDataType ( )
- order ( )
- getExecutioner ( )
- vstack ( )
- write ( )
- sizeOfDataType ( )
- valueArrayOf ( )
- randn ( )
- createArrayFromShapeBuffer ( )
- getStrides ( )
- getRandom ( )
- EPS_THRESHOLD
- createComplex ( )
- setDefaultDataTypes ( )
- hstack ( )
- concat ( )
- argMax ( )
- createTypedBuffer ( )
- createSparseCOO ( )
- pullRows ( )
- copy ( )
- shuffle ( )
- createDouble ( )
- defaultFloatingPointType ( )
- toFlattened ( )
- alloc ( )
- pile ( )
- getComplexStrides ( )
- zerosLike ( )
- empty ( )
- createBufferDetached ( )
- toNpyByteArray ( )
- createFromNpyFile ( )
- arange ( )
- ENFORCE_NUMERICAL_STABILITY
- gemm ( )
- averageAndPropagate ( )
- saveBinary ( )
- createSparseCSR ( )
- expandDims ( )
- sort ( )
- clearNans ( )
- tensorMmul ( )
- eye ( )
- append ( )
- createFromFlatArray ( )
- createComplexNumber ( )
- accumulate ( )
- readBinary ( )
- isFallbackModeEnabled ( )
- createFloat ( )
- MAX_SLICES_TO_PRINT
- writeComplex ( )
- createTypedBufferDetached ( )
- isExperimentalMode ( )
- trueScalar ( )
- createNpyFromByteArray ( )
- createFromNpzFile ( )
Related Classes
- java.util.Arrays
- java.io.File
- java.util.Collections
- java.util.Random
- java.nio.ByteBuffer
- org.junit.Ignore
- org.nd4j.linalg.api.ndarray.INDArray
- org.deeplearning4j.nn.conf.NeuralNetConfiguration
- org.deeplearning4j.nn.weights.WeightInit
- org.deeplearning4j.nn.multilayer.MultiLayerNetwork
- org.deeplearning4j.nn.conf.layers.DenseLayer
- org.deeplearning4j.nn.conf.layers.OutputLayer
- org.nd4j.linalg.activations.Activation
- org.deeplearning4j.nn.conf.MultiLayerConfiguration
- org.nd4j.linalg.lossfunctions.LossFunctions
- org.nd4j.linalg.dataset.DataSet
- org.deeplearning4j.nn.api.OptimizationAlgorithm
- org.nd4j.linalg.dataset.api.iterator.DataSetIterator
- org.deeplearning4j.nn.graph.ComputationGraph
- org.nd4j.linalg.ops.transforms.Transforms
- org.deeplearning4j.nn.conf.inputs.InputType
- org.bytedeco.javacpp.Pointer
- org.nd4j.linalg.indexing.NDArrayIndex
- org.nd4j.linalg.learning.config.Adam
- org.deeplearning4j.nn.conf.ComputationGraphConfiguration
Java Code Examples for org.nd4j.linalg.factory.Nd4j#isExperimentalMode()
The following examples show how to use
org.nd4j.linalg.factory.Nd4j#isExperimentalMode() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CustomOpsTests.java From deeplearning4j with Apache License 2.0 | 6 votes |
@Test public void testNoneInplaceOp5() { if (!Nd4j.isExperimentalMode()) return; val arrayX = Nd4j.create(DataType.INT, 10, 10); val arrayY = Nd4j.create(DataType.FLOAT, 10, 10); arrayX.assign(4); arrayY.assign(2.0); val exp = Nd4j.create(DataType.FLOAT,10, 10).assign(6); CustomOp op = DynamicCustomOp.builder("add") .addInputs(arrayX, arrayY) .callInplace(false) .build(); Nd4j.getExecutioner().exec(op); val res = op.getOutputArgument(0); assertEquals(DataType.FLOAT, res.dataType()); assertEquals(exp, res); }
Example 2
Source File: Shape.java From deeplearning4j with Apache License 2.0 | 6 votes |
public static DataType pickPairwiseDataType(@NonNull DataType typeX, @NonNull Number number) { if (!Nd4j.isExperimentalMode()) return typeX; if (number instanceof Double) { return pickPairwiseDataType(typeX, DataType.DOUBLE); } else if (number instanceof Float) { return pickPairwiseDataType(typeX, DataType.FLOAT); } else if (number instanceof Long) { return pickPairwiseDataType(typeX, DataType.LONG); } else if (number instanceof Integer) { return pickPairwiseDataType(typeX, DataType.INT); } else if (number instanceof Short) { return pickPairwiseDataType(typeX, DataType.SHORT); } else if (number instanceof Byte) { return pickPairwiseDataType(typeX, DataType.BYTE); } else { throw new UnsupportedOperationException("Unknown Number used: [" + number.getClass().getCanonicalName() + "]"); } }
Example 3
Source File: Shape.java From deeplearning4j with Apache License 2.0 | 4 votes |
public static DataType pickPairwiseDataType(@NonNull DataType typeX, @NonNull DataType typeY) { if (!Nd4j.isExperimentalMode()) return typeX; if (typeX == typeY) return typeX; val rX = isR(typeX); val rY = isR(typeY); // if X is float - use it if (rX && !rY) return typeX; // if Y is float - use it if (!rX && rY) return typeY; // if both data types are float - return biggest one if (rX && rY) { // if we allow precision boost, then we pick bigger data type if (Nd4j.isPrecisionBoostAllowed()) { return max(typeX, typeY); } else { // and we return first operand otherwise return typeX; } } // if that's not real type, we apply same rules if (!rX && !rY) { if (Nd4j.isPrecisionBoostAllowed()) { return max(typeX, typeY); } else { // and we return first operand otherwise return typeX; } } return typeX; }