Last active
September 3, 2018 06:36
-
-
Save liweigu/8af223c3e245775d11f276cfe26e28ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
error info: | |
java.lang.IllegalStateException: Expected rank 4 mask array for 2D CNN layers. Mask arrays for 2D CNN layers must have shape [batchSize,channels,X,Y] where X = (1 or activationsHeight) and Y = (1 or activationsWidth): Got rank 2 array with shape [60, 1] | |
at org.deeplearning4j.util.ConvolutionUtils.cnn2dMaskReduction(ConvolutionUtils.java:602) | |
at org.deeplearning4j.nn.layers.convolution.ConvolutionLayer.feedForwardMaskArray(ConvolutionLayer.java:473) | |
at org.deeplearning4j.nn.graph.vertex.impl.LayerVertex.feedForwardMaskArrays(LayerVertex.java:196) | |
at org.deeplearning4j.nn.graph.ComputationGraph.setLayerMaskArrays(ComputationGraph.java:3689) | |
at org.deeplearning4j.nn.graph.ComputationGraph.fitHelper(ComputationGraph.java:1115) | |
at org.deeplearning4j.nn.graph.ComputationGraph.fit(ComputationGraph.java:1097) | |
at org.deeplearning4j.nn.graph.ComputationGraph.fit(ComputationGraph.java:962) | |
code: | |
featuresMask = Nd4j.create(inputMask, new int[] { sampleCount, size }); | |
(other code is unchanged in https://gist.github.com/liweigu/f0dafd8045d766b39c23e1b52938b2ac) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment