This is an automated email from the ASF dual-hosted git repository.
nswamy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new 6abfc70 NPE in BucketingModule when providedLabel of DataBatch is not
set (#11790)
6abfc70 is described below
commit 6abfc70964432948cb9a122a0f307ffb0abe13dd
Author: Milan Desai <[email protected]>
AuthorDate: Tue Jul 17 22:13:00 2018 -0700
NPE in BucketingModule when providedLabel of DataBatch is not set (#11790)
NPE in BucketingModule when providedLabel of DataBatch is not set
---
scala-package/core/src/main/scala/org/apache/mxnet/IO.scala | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scala-package/core/src/main/scala/org/apache/mxnet/IO.scala
b/scala-package/core/src/main/scala/org/apache/mxnet/IO.scala
index d9c767c..47fd4ee 100644
--- a/scala-package/core/src/main/scala/org/apache/mxnet/IO.scala
+++ b/scala-package/core/src/main/scala/org/apache/mxnet/IO.scala
@@ -356,6 +356,10 @@ object DataDesc {
}
implicit def ListMap2Descs(shapes: ListMap[String, Shape]):
IndexedSeq[DataDesc] = {
- shapes.map { case (k, s) => new DataDesc(k, s) }.toIndexedSeq
+ if (shapes != null) {
+ shapes.map { case (k, s) => new DataDesc(k, s) }.toIndexedSeq
+ } else {
+ null
+ }
}
}