You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
Exception in thread "main" java.lang.IllegalArgumentException: requirement failed: number of dimensions in shape :1withshape: (50) should match the length of the layout: 4withlayout: NCHW
at scala.Predef$.require(Predef.scala:224)
at org.apache.mxnet.DataDesc.<init>(IO.scala:233)
at org.apache.mxnet.DataDesc$$anonfun$ListMap2Descs$1.apply(IO.scala:256)
at org.apache.mxnet.DataDesc$$anonfun$ListMap2Descs$1.apply(IO.scala:256)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
at scala.collection.Iterator$class.foreach(Iterator.scala:891)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1334)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
at scala.collection.AbstractTraversable.map(Traversable.scala:104)
at org.apache.mxnet.DataDesc$.ListMap2Descs(IO.scala:256)
at org.apache.mxnet.module.BaseModule.fit(BaseModule.scala:399)
Description
Fitting using Scala and Module API throws an IAE.
Apparently the label shape of (50) doesn't correspond to expected the NCHW format.
Environment info (Required)
macOS 10.13.6
IntelliJ 2018.2.2
Scala 2.11.12
Java 1.8.0_121
MXNet 1.2.1
Error Message:
Minimum reproducible example
Tried debugging this, but pretty difficult to find out what's going on with a stringly typed API.
println(trainDataIter.provideData)-> Map(data -> (50,3,128,128))println(trainDataIter.provideLabel)-> Map(label -> (50))