nswamy commented on a change in pull request #11844: [MXNET-689] add DataDesc 
type for the Scala Package
URL: https://github.com/apache/incubator-mxnet/pull/11844#discussion_r209801084
 
 

 ##########
 File path: 
scala-package/core/src/main/scala/org/apache/mxnet/io/NDArrayIter.scala
 ##########
 @@ -42,27 +43,40 @@ import scala.collection.immutable.ListMap
 class NDArrayIter(data: IndexedSeq[(String, NDArray)],
                   label: IndexedSeq[(String, NDArray)],
                   private val dataBatchSize: Int, shuffle: Boolean,
-                  lastBatchHandle: String) extends DataIter {
-
+                  lastBatchHandle: String,
+                  dataDType: DType, labelDType: DType,
+                  dataLayout: String, labelLayout: String) extends DataIter {
+
+  // scalastyle:off
+  def this(data: IndexedSeq[NDArray], label: IndexedSeq[NDArray],
+           dataBatchSize: Int, shuffle: Boolean,
+           lastBatchHandle: String,
+           dataName: String, labelName: String,
+           dataDType: DType, labelDType: DType,
+           dataLayout: String, labelLayout: String) {
+    this(IO.initData(data, allowEmpty = false, dataName),
 
 Review comment:
   how about changing/adding API for `initData` that will give you 
`IndexedSeq[DataDesc]` instead of `IndexedSeq[(String, NDArray)]`
   
   `initData` seems to be giving the default names for Inputs and labels.
   
   ```
   private def initDataDesc(data: Indexed[ND]): Indexed[DataDesc]
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to