Skip to content

Commit

Permalink
Add torchmodel and torchloss (intel-analytics#2224)
Browse files Browse the repository at this point in the history
* add torchmodel and torchloss

* add some comments

* delete import tfnet

* add ut

* speed up set weight and get gradient

* add unit test

* fix style check

* fix python style check

* add test tag

* some change

* move torchmodel and loss to another folder

* support input and target from scala

* fix style

* update model and los

* fix ut

* update

* exclude torchmodel serial test
  • Loading branch information
qiuxin2012 authored May 9, 2020
1 parent ef5ea70 commit 94bf8d4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ object PythonLoaderFeatureSet{
jepRDD
}

protected def toArrayTensor(
private[zoo] def toArrayTensor(
data: AnyRef): Array[Tensor[Float]] = {
data match {
case ndArray: NDArray[_] =>
Expand All @@ -418,7 +418,7 @@ object PythonLoaderFeatureSet{
}
}

protected def ndArrayToTensor(ndArray: NDArray[_]): Tensor[Float] = {
private[zoo] def ndArrayToTensor(ndArray: NDArray[_]): Tensor[Float] = {
val array = ndArray.asInstanceOf[NDArray[Array[_]]]
val data = array.getData()
data(0) match {
Expand Down

0 comments on commit 94bf8d4

Please sign in to comment.