Example usage for org.deeplearning4j.nn.conf.inputs InputType getType

List of usage examples for org.deeplearning4j.nn.conf.inputs InputType getType

Introduction

In this page you can find the example usage for org.deeplearning4j.nn.conf.inputs InputType getType.

Prototype

@JsonIgnore
    public abstract Type getType();

Source Link

Usage

From source file:org.ensor.fftmusings.mdn.MixtureDensityRNNOutputLayer.java

License:Apache License

@Override
public InputType getOutputType(int layerIndex, InputType inputType) {
    if (inputType == null || inputType.getType() != InputType.Type.RNN) {
        throw new IllegalStateException("Invalid input type for RnnOutputLayer (layer index = " + layerIndex
                + ", layer name=\"" + getLayerName() + "\"): Expected RNN input, got " + inputType);
    }//from w w w  . ja  va 2 s. c  o m
    return InputType.recurrent(nOut);
}

From source file:org.ensor.fftmusings.mdn.MixtureDensityRNNOutputLayer.java

License:Apache License

@Override
public void setNIn(InputType inputType, boolean override) {
    if (inputType == null || inputType.getType() != InputType.Type.RNN) {
        throw new IllegalStateException("Invalid input type for RnnOutputLayer (layer name=\"" + getLayerName()
                + "\"): Expected RNN input, got " + inputType);
    }/*w  w w  .  java2 s.  c  o  m*/

    if (nIn <= 0 || override) {
        InputType.InputTypeRecurrent r = (InputType.InputTypeRecurrent) inputType;
        this.nIn = r.getSize();
    }
}