Fix getMemoryReport ArrayIndexOutOfBoundsException (#8015)

Fix Upsampling.getMemoryReport ArrayIndexOutOfBoundsException, see https://github.com/eclipse/deeplearning4j/issues/8014
master
jxtps 2019-07-16 19:23:37 -07:00 committed by Alex Black
parent deba1e0df9
commit 5a0904cb4c
1 changed files with 1 additions and 1 deletions

View File

@ -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;