From 5a0904cb4c4223c4e3be42acd24b84c55a442125 Mon Sep 17 00:00:00 2001 From: jxtps Date: Tue, 16 Jul 2019 19:23:37 -0700 Subject: [PATCH] Fix getMemoryReport ArrayIndexOutOfBoundsException (#8015) Fix Upsampling.getMemoryReport ArrayIndexOutOfBoundsException, see https://github.com/eclipse/deeplearning4j/issues/8014 --- .../java/org/deeplearning4j/nn/conf/layers/Upsampling2D.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/conf/layers/Upsampling2D.java b/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/conf/layers/Upsampling2D.java index 12bdfc53b..1e5eb11f2 100644 --- a/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/conf/layers/Upsampling2D.java +++ b/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/conf/layers/Upsampling2D.java @@ -116,7 +116,7 @@ public class Upsampling2D extends BaseUpsamplingLayer { // During forward pass: im2col array + reduce. Reduce is counted as activations, so only im2col is working mem val im2colSizePerEx = - c.getChannels() * outputType.getHeight() * outputType.getWidth() * size[0] * size[1] * size[2]; + c.getChannels() * outputType.getHeight() * outputType.getWidth() * size[0] * size[1]; // Current implementation does NOT cache im2col etc... which means: it's recalculated on each backward pass long trainingWorkingSizePerEx = im2colSizePerEx;