Codota Logo
ZeroPaddingLayer
Code IndexAdd Codota to your IDE (free)

How to use
ZeroPaddingLayer
in
org.deeplearning4j.nn.conf.layers

Best Java code snippets using org.deeplearning4j.nn.conf.layers.ZeroPaddingLayer (Showing top 13 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: Waikato/wekaDeeplearning4j

 @Override
 public void initializeBackend() {
  this.backend = new org.deeplearning4j.nn.conf.layers.ZeroPaddingLayer();
 }
}
origin: org.deeplearning4j/deeplearning4j-nn

@Override
public InputPreProcessor getPreProcessorForInputType(InputType inputType) {
  if (inputType == null) {
    throw new IllegalStateException("Invalid input for ZeroPaddingLayer layer (layer name=\"" + getLayerName()
            + "\"): input is null");
  }
  return InputTypeUtil.getPreProcessorForInputTypeCnnLayers(inputType, getLayerName());
}
origin: Waikato/wekaDeeplearning4j

public void setPadding(int[] padding) {
 backend.setPadding(padding);
}
origin: Waikato/wekaDeeplearning4j

@OptionMetadata(
  displayName = "number of columns in padding",
  description = "The number of columns in the padding (default = 0).",
  commandLineParamName = "paddingColumns",
  commandLineParamSynopsis = "-paddingColumns <int>",
  displayOrder = 9
)
public int getPaddingColumns() {
 return backend.getPadding()[1];
}
origin: org.deeplearning4j/deeplearning4j-modelimport

/**
 * Get layer output type.
 *
 * @param  inputType    Array of InputTypes
 * @return              output type as InputType
 * @throws InvalidKerasConfigurationException
 */
@Override
public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException {
  if (inputType.length > 1)
    throw new InvalidKerasConfigurationException(
            "Keras ZeroPadding layer accepts only one input (received " + inputType.length + ")");
  return this.getZeroPaddingLayer().getOutputType(-1, inputType[0]);
}
origin: org.deeplearning4j/deeplearning4j-nn

@Override
public org.deeplearning4j.nn.api.Layer instantiate(NeuralNetConfiguration conf,
        Collection<IterationListener> iterationListeners, int layerIndex, INDArray layerParamsView,
        boolean initializeParams) {
  org.deeplearning4j.nn.layers.convolution.ZeroPaddingLayer ret =
          new org.deeplearning4j.nn.layers.convolution.ZeroPaddingLayer(conf);
  ret.setListeners(iterationListeners);
  ret.setIndex(layerIndex);
  Map<String, INDArray> paramTable = initializer().init(conf, layerParamsView, initializeParams);
  ret.setParamTable(paramTable);
  ret.setConf(conf);
  return ret;
}
origin: Waikato/wekaDeeplearning4j

@OptionMetadata(
  displayName = "number of rows in padding",
  description = "The number of rows in the padding (default = 0).",
  commandLineParamName = "paddingRows",
  commandLineParamSynopsis = "-paddingRows <int>",
  displayOrder = 8
)
public int getPaddingRows() {
 return backend.getPadding()[0];
}
origin: org.deeplearning4j/deeplearning4j-nn

@Override
public LayerMemoryReport getMemoryReport(InputType inputType) {
  InputType outputType = getOutputType(-1, inputType);
  return new LayerMemoryReport.Builder(layerName, ZeroPaddingLayer.class, inputType, outputType)
          .standardMemory(0, 0) //No params
          //Inference and training is same - just output activations, no working memory in addition to that
          .workingMemory(0, 0, MemoryReport.CACHE_MODE_ALL_ZEROS, MemoryReport.CACHE_MODE_ALL_ZEROS)
          .cacheMemory(MemoryReport.CACHE_MODE_ALL_ZEROS, MemoryReport.CACHE_MODE_ALL_ZEROS) //No caching
          .build();
}
origin: Waikato/wekaDeeplearning4j

@ProgrammaticProperty
public int[] getPadding() {
 return backend.getPadding();
}
origin: org.deeplearning4j/deeplearning4j-nn

  @Override
  @SuppressWarnings("unchecked")
  public ZeroPaddingLayer build() {
    for (int p : padding) {
      if (p < 0) {
        throw new IllegalStateException(
                "Invalid zero padding layer config: padding [top, bottom, left, right]"
                        + " must be > 0 for all elements. Got: "
                        + Arrays.toString(padding));
      }
    }
    return new ZeroPaddingLayer(this);
  }
}
origin: Waikato/wekaDeeplearning4j

public void setPaddingColumns(int padding) {
 int[] pad = new int[]{getPaddingRows(), padding};
 backend.setPadding(pad);
}
origin: org.deeplearning4j/deeplearning4j-nn

public ZeroPaddingLayer(NeuralNetConfiguration conf) {
  super(conf);
  this.padding = ((org.deeplearning4j.nn.conf.layers.ZeroPaddingLayer) conf.getLayer()).getPadding();
}
origin: Waikato/wekaDeeplearning4j

public void setPaddingRows(int padding) {
 int[] pad = new int[]{padding, getPaddingColumns()};
 backend.setPadding(pad);
}
org.deeplearning4j.nn.conf.layersZeroPaddingLayer

Javadoc

Zero padding layer for convolutional neural networks. Allows padding to be done separately for top/bottom/left/right

Most used methods

  • <init>
  • getOutputType
  • getPadding
  • getLayerName
  • initializer
  • setPadding

Popular in Java

  • Start an intent from android
  • onCreateOptionsMenu (Activity)
  • findViewById (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now