Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upsampling.getMemoryReport ArrayIndexOutOfBoundsException #8014

Closed
jxtps opened this issue Jul 16, 2019 · 1 comment
Closed

Upsampling.getMemoryReport ArrayIndexOutOfBoundsException #8014

jxtps opened this issue Jul 16, 2019 · 1 comment

Comments

@jxtps
Copy link
Contributor

jxtps commented Jul 16, 2019

Issue Description

Calling Upsampling.getMemoryReport leads to an ArrayIndexOutOfBoundsException:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2
	at org.deeplearning4j.nn.conf.layers.Upsampling2D.getMemoryReport(Upsampling2D.java:119)
	at org.deeplearning4j.nn.conf.graph.LayerVertex.getMemoryReport(LayerVertex.java:147)
	at org.deeplearning4j.nn.conf.ComputationGraphConfiguration.getMemoryReport(ComputationGraphConfiguration.java:635)

Looking at the source code, it currently reads:

val im2colSizePerEx = c.getChannels() * outputType.getHeight() * outputType.getWidth() 
    * size[0] * size[1] * size[2];

Presumably it should be:

val im2colSizePerEx = c.getChannels() * outputType.getHeight() * outputType.getWidth() 
    * size[0] * size[1];

(i.e. drop * size[2]) since the layer only has 2 dimensions.

jxtps added a commit to jxtps/deeplearning4j that referenced this issue Jul 16, 2019
Fix Upsampling.getMemoryReport ArrayIndexOutOfBoundsException, see deeplearning4j#8014
AlexDBlack pushed a commit that referenced this issue Jul 17, 2019
Fix Upsampling.getMemoryReport ArrayIndexOutOfBoundsException, see #8014
@AlexDBlack
Copy link
Contributor

Thanks for the issue/fix: #8015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants