diff --git a/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/wrappers/KerasBidirectional.java b/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/wrappers/KerasBidirectional.java index d37ee399c..3b7cb1721 100644 --- a/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/wrappers/KerasBidirectional.java +++ b/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/wrappers/KerasBidirectional.java @@ -190,7 +190,7 @@ public class KerasBidirectional extends KerasLayer { "Keras Bidirectional layer accepts only one input (received " + inputType.length + ")"); InputPreProcessor preProcessor = getInputPreprocessor(inputType); if (preProcessor != null) - return preProcessor.getOutputType(inputType[0]); + return this.getBidirectionalLayer().getOutputType(-1, preProcessor.getOutputType(inputType[0])); else return this.getBidirectionalLayer().getOutputType(-1, inputType[0]); }