@Override public DataBuffer decompress(DataBuffer buffer) { DataBuffer result = Nd4j.getNDArrayFactory().convertDataEx(DataBuffer.TypeEx.FLOAT8, buffer, getGlobalTypeEx()); return result; }
/** * This method sums given arrays and stores them to a given target array * * @param target * @param arrays * @return */ public static INDArray accumulate(INDArray target, INDArray[] arrays) { if (arrays == null|| arrays.length == 0) return target; return factory().accumulate(target, arrays); }
public static INDArray appendBias(INDArray... vectors) { INDArray ret = INSTANCE.appendBias(vectors); logCreationIfNecessary(ret); return ret; }
/** * This method averages input arrays, and returns averaged array. * On top of that, averaged array is propagated to all input arrays * * @param arrays * @return */ public static INDArray averageAndPropagate(INDArray target, Collection<INDArray> arrays) { INDArray ret = INSTANCE.average(target, arrays); logCreationIfNecessary(ret); return ret; }
/** * Returns a column vector where each entry is the nth bilinear * product of the nth slices of the two tensors. */ public static INDArray bilinearProducts(INDArray curr, INDArray in) { return INSTANCE.bilinearProducts(curr, in); }
/** * Array of evenly spaced values. * * @param begin the begin of the range * @param end the end of the range * @return the range vector */ public static INDArray arange(double begin, double end) { INDArray ret = INSTANCE.arange(begin, end); logCreationIfNecessary(ret); return ret; }
props.put(Nd4jEnvironment.CUDA_NUM_GPUS_KEY, nativeOps.getAvailableDevices()); props.put(Nd4jEnvironment.CUDA_DEVICE_INFORMATION_KEY, devicesList); props.put(Nd4jEnvironment.BLAS_VENDOR_KEY, (Nd4j.factory().blas()).getBlasVendor().toString()); props.put(Nd4jEnvironment.HOST_FREE_MEMORY_KEY, Pointer.maxBytes() - Pointer.totalBytes());
/** * This method averages input arrays, and returns averaged array. * On top of that, averaged array is propagated to all input arrays * * @param arrays * @return */ public static INDArray averageAndPropagate(INDArray target, INDArray[] arrays) { INDArray ret = INSTANCE.average(target, arrays); logCreationIfNecessary(ret); return ret; }
/** * Returns a column vector where each entry is the nth bilinear * product of the nth slices of the two tensors. */ public static INDArray bilinearProducts(INDArray curr, INDArray in) { return INSTANCE.bilinearProducts(curr, in); }
/** * Array of evenly spaced values. * * @param begin the begin of the range * @param end the end of the range * @return the range vector */ public static INDArray arange(double begin, double end) { INDArray ret = INSTANCE.arange(begin, end); logCreationIfNecessary(ret); return ret; }
@Override public DataBuffer compress(DataBuffer buffer) { DataBuffer result = Nd4j.getNDArrayFactory().convertDataEx(getBufferTypeEx(buffer), buffer, DataBuffer.TypeEx.INT8); return result; }
/** * This method averages input arrays, and returns averaged array. * On top of that, averaged array is propagated to all input arrays * * @param arrays * @return */ public static INDArray averageAndPropagate(INDArray[] arrays) { INDArray ret = INSTANCE.average(arrays); logCreationIfNecessary(ret); return ret; }
public static INDArray appendBias(INDArray... vectors) { INDArray ret = INSTANCE.appendBias(vectors); logCreationIfNecessary(ret); return ret; }
/** * This method sums given arrays and stores them to a given target array * * @param target * @param arrays * @return */ public static INDArray accumulate(INDArray target, INDArray[] arrays) { if (arrays == null|| arrays.length == 0) return target; return factory().accumulate(target, arrays); }
@Override public DataBuffer compress(DataBuffer buffer) { DataBuffer result = Nd4j.getNDArrayFactory().convertDataEx(getBufferTypeEx(buffer), buffer, DataBuffer.TypeEx.FLOAT16); return result; }
/** * This method averages input arrays, and returns averaged array. * On top of that, averaged array is propagated to all input arrays * * @param arrays * @return */ public static INDArray averageAndPropagate(Collection<INDArray> arrays) { INDArray ret = INSTANCE.average(arrays); logCreationIfNecessary(ret); return ret; }
@Override public DataBuffer compress(DataBuffer buffer) { DataBuffer result = Nd4j.getNDArrayFactory().convertDataEx(getBufferTypeEx(buffer), buffer, DataBuffer.TypeEx.INT16); return result; }
/** * This method averages input arrays, and returns averaged array. * On top of that, averaged array is propagated to all input arrays * * @param arrays * @return */ public static INDArray averageAndPropagate(INDArray target, INDArray[] arrays) { INDArray ret = INSTANCE.average(target, arrays); logCreationIfNecessary(ret); return ret; }
@Override public DataBuffer decompress(DataBuffer buffer) { val type = getGlobalTypeEx(); DataBuffer result = Nd4j.getNDArrayFactory().convertDataEx(DataBuffer.TypeEx.FLOAT16, buffer, type); return result; }
/** * This method averages input arrays, and returns averaged array. * On top of that, averaged array is propagated to all input arrays * * @param arrays * @return */ public static INDArray averageAndPropagate(INDArray target, Collection<INDArray> arrays) { INDArray ret = INSTANCE.average(target, arrays); logCreationIfNecessary(ret); return ret; }