From 3900d9ff06e0e3c4289474c9aebf04a165be7eaa Mon Sep 17 00:00:00 2001 From: Susan Eraly Date: Mon, 30 Mar 2020 03:07:47 -0700 Subject: [PATCH] Simple fix in bidirectional lstm import (#293) * first pass Signed-off-by: eraly * cleanup Signed-off-by: eraly --- .../modelimport/keras/layers/wrappers/KerasBidirectional.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]); }