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.
Repository navigation
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
Scala: DataDesc IllegalArgumentException with simple example #12409
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)
Feedforward as the name suggests works for FeedForward networks which are single input/single output but Module APIs will work for multi-input/multi-output FeedForward and CNNs, GANs, RNNs(probably requires the extended Bucketing Module which is in examples)
One more issue, Module-based GPU training on Ubuntu fails during the second epoch with a SIGTERM. I don't know yet what's happening. FeedForward-based training in 1.2.1 works without a problem.
Activity
anirudhacharya commentedon Aug 30, 2018
@mxnet-label-bot [Scala]
lanking520 commentedon Aug 30, 2018
Hi @mariussoutier this problem actually addressed in 1.3 in this PR: #11844. Try with this one!
mariussoutier commentedon Aug 31, 2018
@lanking520 Is there a published version of that I can use or do I have to build it myself?
lanking520 commentedon Sep 1, 2018
Unfortunately, you need to build from source with 1.3 or please wait for us to publish that. It will be out very soon.
mariussoutier commentedon Sep 2, 2018
Ok I'll test again then. I feel like the Scala API could use some love :-)
nswamy commentedon Sep 4, 2018
@mariussoutier we are working on a 1.3.0 pre-release, we should be able to have a RC maven package in staging soon.
mariussoutier commentedon Sep 8, 2018
Nice, looking forward to it.
nswamy commentedon Sep 12, 2018
@mariussoutier we released the package to Staging here if you would like to test it.
https://repository.apache.org/content/repositories/staging/org/apache/mxnet/
See the instructions on how to use packages in Staging repo here:
https://cwiki.apache.org/confluence/display/MXNET/MXNet-Scala+Release+Process#MXNet-ScalaReleaseProcess-UsingPackagesinStagingRepository
mariussoutier commentedon Sep 13, 2018
@nswamy Just tried it out, Module API seems to work now. Thanks!
mariussoutier commentedon Sep 13, 2018
Is there any difference between Module and FeedForward anyway?
nswamy commentedon Sep 13, 2018
Feedforward as the name suggests works for FeedForward networks which are single input/single output but Module APIs will work for multi-input/multi-output FeedForward and CNNs, GANs, RNNs(probably requires the extended Bucketing Module which is in examples)
mariussoutier commentedon Sep 13, 2018
Ok, makes sense. I've also used FeedForward for my CNN :-)
mariussoutier commentedon Sep 13, 2018
One more issue, Module-based GPU training on Ubuntu fails during the second epoch with a SIGTERM. I don't know yet what's happening. FeedForward-based training in 1.2.1 works without a problem.
nswamy commentedon Sep 13, 2018
could you please open a new issue with some reproducible code?
mariussoutier commentedon Sep 13, 2018
Sure, will do.
ddavydenko commentedon Sep 25, 2018
Seems like this extra question was filed and replied to in #12553. Could we close this issue as it has been addressed in comments above?