yzhliu 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_r208723339
##########
File path:
scala-package/core/src/main/scala/org/apache/mxnet/io/MXDataIter.scala
##########
@@ -30,32 +31,55 @@ import scala.collection.mutable.ListBuffer
* @param handle the handle to the underlying C++ Data Iterator
*/
private[mxnet] class MXDataIter(private[mxnet] val handle: DataIterHandle,
- dataName: String = "data",
- labelName: String = "label")
+ dataName: String,
+ labelName: String,
+ dataLayout: String,
+ labelLayout: String,
+ dataDType: DType,
+ labelDType: DType)
extends DataIter with WarnIfNotDisposed {
private val logger = LoggerFactory.getLogger(classOf[MXDataIter])
+ def this(handle: DataIterHandle,
+ dataName: String = "data",
+ labelName: String = "label") {
+ this(handle, dataName, labelName, Layout.UNDEFINED, Layout.UNDEFINED,
+ DType.Float32, DType.Float32)
+ }
+
// use currentBatch to implement hasNext
// (may be this is not the best way to do this work,
// fix me if any better way found)
private var currentBatch: DataBatch = null
- private val (_provideData: ListMap[String, Shape],
- _provideLabel: ListMap[String, Shape],
- _batchSize: Int) =
+ private val (_provideDataDesc: IndexedSeq[DataDesc],
+ _provideLabelDesc: IndexedSeq[DataDesc],
+ _provideData: ListMap[String, Shape],
+ _provideLabel: ListMap[String, Shape],
Review comment:
incorrect indent?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services