deeplearning4j / deeplearning4j/deeplearning4j-examples

Bug in ImportMobileNetExample

Open
#1,031 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.5k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

I get the following Exception running ImportMobileNetExample with a native backend:

Exception in thread "main" java.lang.IllegalArgumentException: Incorrect number of arguments for permute function: got arguments [0, 2, 3, 1] for rank 5 array. Number of arguments must equal array rank
at org.nd4j.common.base.Preconditions.throwEx(Preconditions.java:636)
at org.nd4j.common.base.Preconditions.checkArgument(Preconditions.java:137)
at org.nd4j.linalg.api.ndarray.BaseNDArray.permute(BaseNDArray.java:4758)
at mobilenet.ImportMobileNetExample.inceptionPreprocessing(ImportMobileNetExample.java:104)
at mobilenet.ImportMobileNetExample.main(ImportMobileNetExample.java:38)

Code throwing the exception:
// change to channels-last
img = img.permute(0, 2, 3, 1);

Any help would be appreciated.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.