From 597abdf063bcd0a25631de7d50160038bfc944f8 Mon Sep 17 00:00:00 2001 From: brian Date: Wed, 21 Sep 2022 14:42:42 +0200 Subject: [PATCH] Fix KerasUpsampling2D Signed-off-by: brian --- .../keras/layers/convolutional/KerasUpsampling2D.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cavis-dnn/cavis-dnn-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/convolutional/KerasUpsampling2D.java b/cavis-dnn/cavis-dnn-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/convolutional/KerasUpsampling2D.java index 0e15e75d0..c9099e17b 100644 --- a/cavis-dnn/cavis-dnn-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/convolutional/KerasUpsampling2D.java +++ b/cavis-dnn/cavis-dnn-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/convolutional/KerasUpsampling2D.java @@ -61,14 +61,10 @@ public class KerasUpsampling2D extends KerasLayer { super(layerConfig, enforceTrainingConfig); int[] size = KerasConvolutionUtils.getUpsamplingSizeFromConfig(layerConfig, 2, conf); - if (size[0] != size[1]) - throw new UnsupportedKerasConfigurationException("First and second size arguments have to be the same" + - "got: " + size[0] + " and " + size[1]); - Upsampling2D.Builder builder = new Upsampling2D.Builder() .name(this.layerName) .dropOut(this.dropout) - .size(size[0]); + .size(size); this.layer = builder.build(); this.vertex = null;