Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
remove the provideLabelShape
Browse files Browse the repository at this point in the history
  • Loading branch information
lanking520 committed Aug 16, 2018
1 parent ca3b664 commit 9a669a7
Showing 1 changed file with 5 additions and 24 deletions.
29 changes: 5 additions & 24 deletions scala-package/core/src/main/scala/org/apache/mxnet/IO.scala
Original file line number Diff line number Diff line change
Expand Up @@ -262,42 +262,23 @@ object DataBatch {
this
}

@deprecated
def provideDataShape(name: String, shape: Shape): Builder = {
provideDataDesc(new DataDesc(name, shape))
}

@deprecated
def provideLabelShape(name: String, shape: Shape): Builder = {
provideLabelDesc(new DataDesc(name, shape))
}

/**
* Provide the shape of a data.
* @param dataDesc DataDescriptor
* @return this.
*/
def provideDataDesc(dataDesc: DataDesc): Builder = {
if (this.dataDesc == null) {
this.dataDesc = IndexedSeq(dataDesc)
} else {
this.dataDesc = IndexedSeq(dataDesc)
}
def provideDataDesc(dataDesc: IndexedSeq[DataDesc]): Builder = {
this.dataDesc = dataDesc
this
}

/**
* Provide the shape of a label.
* @param name label name.
* @param shape label shape.
* @param labelDesc LabelDescriptor
* @return this.
*/
def provideLabelDesc(dataDesc: DataDesc): Builder = {
if (this.labelDesc == null) {
this.labelDesc = IndexedSeq(dataDesc)
} else {
this.labelDesc = this.labelDesc ++ IndexedSeq(dataDesc)
}
def provideLabelDesc(labelDesc: IndexedSeq[DataDesc]): Builder = {
this.labelDesc = labelDesc
this
}

Expand Down

0 comments on commit 9a669a7

Please sign in to comment.