From f547f783d95c2aa41bd5bac1ec25611926d3b3db Mon Sep 17 00:00:00 2001 From: Alex Black Date: Wed, 13 May 2020 14:50:23 +1000 Subject: [PATCH] Keras import - remove debug lines (println/log) [WIP] (#459) * Remove debug line from KerasConvolution2D Signed-off-by: Alex Black * Remove more debug lines Signed-off-by: Alex Black --- .../deeplearning4j/nn/modelimport/keras/layers/KerasInput.java | 2 -- .../nn/modelimport/keras/layers/TFOpLayerImpl.java | 2 +- .../keras/layers/convolutional/KerasConvolution2D.java | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/KerasInput.java b/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/KerasInput.java index d83d27011..530d79d1c 100644 --- a/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/KerasInput.java +++ b/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/KerasInput.java @@ -128,8 +128,6 @@ public class KerasInput extends KerasLayer { break; case 2: if(this.dimOrder != null) { - System.out.println("Dim order: " + this.dimOrder); - System.out.println("Input shape: " + ArrayUtils.toString(this.inputShape)); switch (this.dimOrder) { case TENSORFLOW: //NWC == channels_last myInputType = new InputType.InputTypeRecurrent(this.inputShape[1], this.inputShape[0], RNNFormat.NWC); diff --git a/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/TFOpLayerImpl.java b/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/TFOpLayerImpl.java index 751f939c9..47d063826 100644 --- a/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/TFOpLayerImpl.java +++ b/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/TFOpLayerImpl.java @@ -103,7 +103,7 @@ public class TFOpLayerImpl extends AbstractLayer { String dtype = inputDataTypes.get(inpName); graph = "node{\nname: \"" + inpName + "\"\nop: \"Placeholder\"\nattr{\nkey: \"dtype\"\n value {\n type: " + dtype + "}\n}\n}\n" + graph; } - log.info(graph); + //log.info(graph); GraphDef.Builder graphDefBuilder = GraphDef.newBuilder(); TextFormat.getParser().merge(graph, graphDefBuilder); GraphDef graphDef = graphDefBuilder.build(); diff --git a/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/convolutional/KerasConvolution2D.java b/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/convolutional/KerasConvolution2D.java index 51d481e5d..84c24614a 100644 --- a/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/convolutional/KerasConvolution2D.java +++ b/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/convolutional/KerasConvolution2D.java @@ -95,7 +95,6 @@ public class KerasConvolution2D extends KerasConvolution { LayerConstraint weightConstraint = KerasConstraintUtils.getConstraintsFromConfig( layerConfig, conf.getLAYER_FIELD_W_CONSTRAINT(), conf, kerasMajorVersion); - System.out.println("----" + dimOrder); ConvolutionLayer.Builder builder = new ConvolutionLayer.Builder().name(this.layerName) .nOut(getNOutFromConfig(layerConfig, conf)).dropOut(this.dropout) .activation(getIActivationFromConfig(layerConfig, conf))