/** * This * @param parties */ public Builder(int parties) { if (parties < 1) throw new DL4JInvalidConfigException( "Number of parties for GradientsAccumulation should be positive value"); this.parties = parties; }
/** * This method enables optional limit for max number of updates per message * * Default value: 1.0 (no limit) * @param boundary positive value in range 0..1 * @return */ public Builder updatesBoundary(double boundary) { if (boundary >= 1.0) return this; if (boundary <= 0.0) throw new DL4JInvalidConfigException("Boundary should have positive value"); this.boundary = boundary; return this; }
/** * Asserts that the layer nIn and nOut values are set for the layer * * @param layerType Type of layer ("DenseLayer", etc) * @param layerName Name of the layer (may be null if not set) * @param layerIndex Index of the layer * @param nIn nIn value * @param nOut nOut value */ public static void assertNInNOutSet(String layerType, String layerName, int layerIndex, int nIn, int nOut) { if (nIn <= 0 || nOut <= 0) { if (layerName == null) layerName = "(name not set)"; throw new DL4JInvalidConfigException(layerType + " (index=" + layerIndex + ", name=" + layerName + ") nIn=" + nIn + ", nOut=" + nOut + "; nIn and nOut must be > 0"); } } }
/** * This constructor will create ModelSavingCallback instance that will save models in specified folder * * PLEASE NOTE: Make sure you have write access to the target folder * * @param rootFolder File object referring to target folder * @param fileNameTemplate */ public ModelSavingCallback(@NonNull File rootFolder, @NonNull String fileNameTemplate) { if (!rootFolder.isDirectory()) throw new DL4JInvalidConfigException("rootFolder argument should point to valid folder"); if (fileNameTemplate.isEmpty()) throw new DL4JInvalidConfigException("Filename template can't be empty String"); this.rootFolder = rootFolder; this.template = fileNameTemplate; }
throw new DL4JInvalidConfigException("Invalid configuration: convolution mode is null for layer (idx=" + layerIdx + ", name=" + name + ", type=" + layerClass.getName() + ")"); throw new DL4JInvalidConfigException(getConfigErrorCommonLine1(layerIdx, layerName, layerClass, sH <= 0) + " Invalid strides: strides must be > 0 (strideH = " + sH + ", strideW = " + sW + ")" + "\n" + getConfigErrorCommonLastLine(inputType, kernelSize, stride, padding, outputDepth, throw new DL4JInvalidConfigException(getConfigErrorCommonLine1(layerIdx, layerName, layerClass, true) + " Invalid input configuration for kernel height. Require 0 < kH <= inHeight + 2*padH; got (kH=" + kH + ", inHeight=" + inHeight + ", padH=" + padH + ")\n" + getConfigErrorCommonLastLine( throw new DL4JInvalidConfigException(getConfigErrorCommonLine1(layerIdx, layerName, layerClass, false) + " Invalid input configuration for kernel width. Require 0 < kW <= inWidth + 2*padW; got (kW=" + kW + ", inWidth=" + inWidth + ", padW=" + padW + ")\n" + getConfigErrorCommonLastLine( int truncated = (int) d; int sameSize = (int) Math.ceil(inHeight / ((double) stride[0])); throw new DL4JInvalidConfigException(getConfigErrorCommonLine1(layerIdx, layerName, layerClass, true) + "\nCombination of kernel size, stride and padding are not valid for given input height, using ConvolutionMode.Strict\n" + "ConvolutionMode.Strict requires: output height = (input height - kernelSize + 2*padding)/stride + 1 in height dimension to be an integer. Got: (" int truncated = (int) d; int sameSize = (int) Math.ceil(inWidth / ((double) stride[1])); throw new DL4JInvalidConfigException(getConfigErrorCommonLine1(layerIdx, layerName, layerClass, false) + "\nCombination of kernel size, stride and padding are not valid for given input width, using ConvolutionMode.Strict\n" + "ConvolutionMode.Strict requires: output width = (input width - kernelSize + 2*padding)/stride + 1 in width dimension to be an integer. Got: ("
this.trainerContext = new SymmetricTrainerContext(); if (this.accumulator == null) throw new DL4JInvalidConfigException( "Please specify GradientsAccumulator fo encoded gradients mode");
this.trainerContext = new SymmetricTrainerContext(); if (this.accumulator == null) throw new DL4JInvalidConfigException( "Please specify GradientsAccumulator fo encoded gradients mode");
int truncated = (int) d; int sameSize = (int) Math.ceil(inW / ((double) strides[1])); throw new DL4JInvalidConfigException( "Invalid input data or configuration: Combination of kernel size, stride and padding are not valid for given input width, using ConvolutionMode.Strict\n" + "ConvolutionMode.Strict requires: output width = (input - kernelSize + 2*padding)/stride + 1 to be an integer. Got: ("
Nd4j.getExecutioner().bitmapDecode(compressed, updates); else throw new DL4JInvalidConfigException("Unknown compression header received: " + encoding); Nd4j.getExecutioner().bitmapDecode(compressed_copy, updates); else throw new DL4JInvalidConfigException( "Unknown compression header received: " + encoding); Nd4j.getExecutioner().bitmapDecode(compressed, updates); else throw new DL4JInvalidConfigException("Unknown compression header received: " + encoding);
Nd4j.getExecutioner().bitmapDecode(compressed, updates); else throw new DL4JInvalidConfigException("Unknown compression header received: " + encoding); Nd4j.getExecutioner().bitmapDecode(compressed_copy, updates); else throw new DL4JInvalidConfigException( "Unknown compression header received: " + encoding); Nd4j.getExecutioner().bitmapDecode(compressed, updates); else throw new DL4JInvalidConfigException("Unknown compression header received: " + encoding);