Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

makeup DLlib from webScaleml #1

Closed
wants to merge 11 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
change groupId
zhangxiaoli73 committed Sep 2, 2016

Unverified

This user has not yet uploaded their public signing key.
commit 8d8646203c68051df47d3a9eb5a045ab66574d17
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.intel.webscaleml.nn.example
package com.intel.analytics.dllib.lib.example

import java.util

import com.intel.webscaleml.nn.nn._
import com.intel.webscaleml.nn.optim.SGD
import com.intel.webscaleml.nn.tensor.TensorNumericMath.TensorNumeric
import com.intel.webscaleml.nn.tensor._
import com.intel.webscaleml.nn.tensor.TensorNumericMath.TensorNumeric._
import com.intel.analytics.dllib.lib.nn._
import com.intel.analytics.dllib.lib.optim.SGD
import com.intel.analytics.dllib.lib.tensor.TensorNumericMath.TensorNumeric
import com.intel.analytics.dllib.lib.tensor._
import com.intel.analytics.dllib.lib.tensor.TensorNumericMath.TensorNumeric._

import scala.reflect.ClassTag

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.intel.webscaleml.nn.example
package com.intel.analytics.dllib.lib.example

import com.intel.webscaleml.nn.nn._
import com.intel.webscaleml.nn.optim.Utils._
import com.intel.webscaleml.nn.optim._
import com.intel.webscaleml.nn.tensor.TensorNumericMath.TensorNumeric
import com.intel.webscaleml.nn.tensor._
import com.intel.analytics.dllib.lib.nn._
import com.intel.analytics.dllib.lib.optim.Utils._
import com.intel.analytics.dllib.lib.optim._
import com.intel.analytics.dllib.lib.tensor.TensorNumericMath.TensorNumeric
import com.intel.analytics.dllib.lib.tensor._
import org.apache.log4j.{Level, Logger}
import org.apache.spark.rdd.RDD
import org.apache.spark.{SparkConf, SparkContext}
@@ -13,7 +13,7 @@ import scopt.OptionParser
import scala.reflect.ClassTag
import scala.util.Random
import scala.collection.mutable.ArrayBuffer
import com.intel.webscaleml.nn.example.Utils._
import com.intel.analytics.dllib.lib.example.Utils._


object Cifar {
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.intel.webscaleml.nn.example
package com.intel.analytics.dllib.lib.example

import com.intel.webscaleml.nn.nn._
import com.intel.webscaleml.nn.optim.{Adagrad, SGD}
import com.intel.webscaleml.nn.tensor.TensorNumericMath.TensorNumeric
import com.intel.webscaleml.nn.tensor.{T, Table, Tensor, torch}
import com.intel.analytics.dllib.lib.nn._
import com.intel.analytics.dllib.lib.optim.{Adagrad, SGD}
import com.intel.analytics.dllib.lib.tensor.TensorNumericMath.TensorNumeric
import com.intel.analytics.dllib.lib.tensor.{T, Table, Tensor, torch}

import scala.io.Source
import scala.reflect.ClassTag
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.intel.webscaleml.nn.example
package com.intel.analytics.dllib.lib.example

import java.util

import com.intel.webscaleml.nn.nn._
import com.intel.webscaleml.nn.optim.SGD
import com.intel.webscaleml.nn.tensor.TensorNumericMath.TensorNumeric
import com.intel.webscaleml.nn.tensor._
import com.intel.webscaleml.nn.tensor.TensorNumericMath.TensorNumeric._
import com.intel.analytics.dllib.lib.nn._
import com.intel.analytics.dllib.lib.optim.SGD
import com.intel.analytics.dllib.lib.tensor.TensorNumericMath.TensorNumeric
import com.intel.analytics.dllib.lib.tensor._
import com.intel.analytics.dllib.lib.tensor.TensorNumericMath.TensorNumeric._

import scala.reflect.ClassTag

Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.intel.webscaleml.nn.example
package com.intel.analytics.dllib.lib.example

import java.nio.ByteBuffer
import java.nio.file.{Paths, Files}
import java.util
import java.util.Collections
import java.util.concurrent.{Executors, ExecutorService, LinkedBlockingQueue, BlockingQueue}

import com.intel.webscaleml.nn.tensor.{Storage, torch, Tensor}
import com.intel.analytics.dllib.lib.tensor.{Storage, torch, Tensor}

object ImageNetUtils {

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.intel.webscaleml.nn.example
package com.intel.analytics.dllib.lib.example

import java.awt.color.{ICC_ColorSpace, ColorSpace}
import java.util

import com.intel.webscaleml.nn.nn.ClassNLLCriterion
import com.intel.webscaleml.nn.optim.SGD
import com.intel.webscaleml.nn.tensor.{T, Table, torch}
import com.intel.analytics.dllib.lib.nn.ClassNLLCriterion
import com.intel.analytics.dllib.lib.optim.SGD
import com.intel.analytics.dllib.lib.tensor.{T, Table, torch}

object ImageNetLocal {
val startTime = System.nanoTime()
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.intel.webscaleml.nn.example
package com.intel.analytics.dllib.lib.example

import com.intel.webscaleml.nn.example.ImageNetUtils._
import com.intel.webscaleml.nn.nn._
import com.intel.webscaleml.nn.optim.EpochOptimizer.Regime
import com.intel.webscaleml.nn.optim._
import com.intel.webscaleml.nn.tensor._
import com.intel.analytics.dllib.lib.example.ImageNetUtils._
import com.intel.analytics.dllib.lib.nn._
import com.intel.analytics.dllib.lib.optim.EpochOptimizer.Regime
import com.intel.analytics.dllib.lib.optim._
import com.intel.analytics.dllib.lib.tensor._
import org.apache.hadoop.io.Text
import org.apache.log4j.{Level, Logger}
import org.apache.spark.{SparkConf, SparkContext}
import org.apache.spark.rdd.RDD
import com.intel.webscaleml.nn.example.Utils._
import com.intel.analytics.dllib.lib.example.Utils._

object ImageNetParallel {

@@ -19,7 +19,7 @@ object ImageNetParallel {
Logger.getLogger("org").setLevel(Level.ERROR)
Logger.getLogger("akka").setLevel(Level.ERROR)
Logger.getLogger("breeze").setLevel(Level.ERROR)
Logger.getLogger("com.intel.webscaleml.nn.optim").setLevel(Level.INFO)
Logger.getLogger("com.intel.analytics.dllib.lib.optim").setLevel(Level.INFO)

val parser = getParser()

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.intel.webscaleml.nn.example
package com.intel.analytics.dllib.lib.example

import java.nio.ByteBuffer
import java.nio.file.{Paths, Files}

import com.intel.webscaleml.nn.nn._
import com.intel.webscaleml.nn.optim._
import com.intel.webscaleml.nn.tensor.{torch, Tensor, T, Table}
import com.intel.analytics.dllib.lib.nn._
import com.intel.analytics.dllib.lib.optim._
import com.intel.analytics.dllib.lib.tensor.{torch, Tensor, T, Table}
import scopt.OptionParser

import scala.util.parsing.json.Parser
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package com.intel.webscaleml.nn.example
package com.intel.analytics.dllib.lib.example

import java.nio.ByteBuffer
import java.nio.file.{Paths, Files}

import com.intel.webscaleml.nn.nn._
import com.intel.webscaleml.nn.optim._
import com.intel.webscaleml.nn.tensor.{T, Table, Tensor, torch}
import com.intel.analytics.dllib.lib.nn._
import com.intel.analytics.dllib.lib.optim._
import com.intel.analytics.dllib.lib.tensor.{T, Table, Tensor, torch}
import org.apache.log4j.{Level, Logger}
import org.apache.spark.rdd.RDD
import org.apache.spark.{SparkContext, SparkConf}
import scopt.OptionParser
import com.intel.webscaleml.nn.example.MNIST._
import com.intel.webscaleml.nn.example.Utils._
import com.intel.analytics.dllib.lib.example.MNIST._
import com.intel.analytics.dllib.lib.example.Utils._

import scala.util.Random

Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package com.intel.webscaleml.nn.example
package com.intel.analytics.dllib.lib.example

import java.nio.ByteBuffer
import java.nio.file.{Paths, Files}

import com.intel.webscaleml.nn.nn._
import com.intel.webscaleml.nn.optim._
import com.intel.webscaleml.nn.tensor.{torch, Tensor, T}
import com.intel.analytics.dllib.lib.nn._
import com.intel.analytics.dllib.lib.optim._
import com.intel.analytics.dllib.lib.tensor.{torch, Tensor, T}
import org.apache.log4j.{Level, Logger}
import org.apache.spark.rdd.RDD
import org.apache.spark.{SparkConf, SparkContext}
import scopt.OptionParser
import com.intel.webscaleml.nn.example.Utils._
import com.intel.analytics.dllib.lib.example.Utils._

import scala.util.Random
import MNIST._
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.intel.webscaleml.nn.example
package com.intel.analytics.dllib.lib.example

import com.intel.webscaleml.nn.nn.{Module, ClassNLLCriterion, Criterion}
import com.intel.webscaleml.nn.optim._
import com.intel.webscaleml.nn.tensor.{T, Table, Tensor}
import com.intel.analytics.dllib.lib.nn.{Module, ClassNLLCriterion, Criterion}
import com.intel.analytics.dllib.lib.optim._
import com.intel.analytics.dllib.lib.tensor.{T, Table, Tensor}
import scopt.OptionParser

import scala.reflect.ClassTag
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.intel.webscaleml.nn.models
package com.intel.analytics.dllib.lib.models

import com.intel.webscaleml.nn.nn._
import com.intel.webscaleml.nn.tensor.TensorNumericMath.TensorNumeric
import com.intel.analytics.dllib.lib.nn._
import com.intel.analytics.dllib.lib.tensor.TensorNumericMath.TensorNumeric

import scala.reflect.ClassTag

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.intel.webscaleml.nn.models
package com.intel.analytics.dllib.lib.models

import com.intel.webscaleml.nn.nn._
import com.intel.webscaleml.nn.tensor.{T, Table}
import com.intel.webscaleml.nn.tensor.TensorNumericMath.TensorNumeric
import com.intel.analytics.dllib.lib.nn._
import com.intel.analytics.dllib.lib.tensor.{T, Table}
import com.intel.analytics.dllib.lib.tensor.TensorNumericMath.TensorNumeric

import scala.reflect.ClassTag

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.intel.webscaleml.nn.models
package com.intel.analytics.dllib.lib.models

import com.intel.webscaleml.nn.nn.{Linear, LogSoftMax, SpatialMaxPooling, _}
import com.intel.webscaleml.nn.tensor.TensorNumericMath.TensorNumeric
import com.intel.analytics.dllib.lib.nn.{Linear, LogSoftMax, SpatialMaxPooling, _}
import com.intel.analytics.dllib.lib.tensor.TensorNumericMath.TensorNumeric

import scala.reflect.ClassTag

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.intel.webscaleml.nn.models
package com.intel.analytics.dllib.lib.models

import java.util

import com.intel.webscaleml.nn.nn.{ClassNLLCriterion, Module, SpatialConvolution}
import com.intel.webscaleml.nn.tensor.TensorNumericMath.TensorNumeric
import com.intel.webscaleml.nn.tensor.{Tensor, torch}
import com.intel.analytics.dllib.lib.nn.{ClassNLLCriterion, Module, SpatialConvolution}
import com.intel.analytics.dllib.lib.tensor.TensorNumericMath.TensorNumeric
import com.intel.analytics.dllib.lib.tensor.{Tensor, torch}
import scopt.OptionParser


Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.intel.webscaleml.nn.models
package com.intel.analytics.dllib.lib.models

import com.intel.webscaleml.nn.nn._
import com.intel.webscaleml.nn.tensor.TensorNumericMath.TensorNumeric
import com.intel.analytics.dllib.lib.nn._
import com.intel.analytics.dllib.lib.tensor.TensorNumericMath.TensorNumeric

import scala.reflect.ClassTag

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.intel.webscaleml.nn.nn
package com.intel.analytics.dllib.lib.nn

import com.intel.webscaleml.nn.tensor.TensorNumericMath.TensorNumeric
import com.intel.webscaleml.nn.tensor.{DenseTensorApply, torch, Tensor}
import com.intel.analytics.dllib.lib.tensor.TensorNumericMath.TensorNumeric
import com.intel.analytics.dllib.lib.tensor.{DenseTensorApply, torch, Tensor}

import scala.reflect.ClassTag

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.intel.webscaleml.nn.nn
package com.intel.analytics.dllib.lib.nn

import com.intel.webscaleml.nn.tensor.TensorNumericMath.TensorNumeric
import com.intel.webscaleml.nn.tensor.{Tensor, torch}
import com.intel.analytics.dllib.lib.tensor.TensorNumericMath.TensorNumeric
import com.intel.analytics.dllib.lib.tensor.{Tensor, torch}
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.duration.Duration
import scala.concurrent.{Await, ExecutionContext, Future}
import com.intel.webscaleml.nn.tensor.RandomGenerator._
import com.intel.analytics.dllib.lib.tensor.RandomGenerator._

import scala.reflect.ClassTag

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.intel.webscaleml.nn.nn
package com.intel.analytics.dllib.lib.nn

import com.intel.webscaleml.nn.tensor.TensorNumericMath.TensorNumeric
import com.intel.webscaleml.nn.tensor.{torch, Tensor}
import com.intel.analytics.dllib.lib.tensor.TensorNumericMath.TensorNumeric
import com.intel.analytics.dllib.lib.tensor.{torch, Tensor}
import scala.concurrent.duration.Duration
import scala.concurrent.{Await, Future}
import scala.reflect.ClassTag
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.intel.webscaleml.nn.nn
package com.intel.analytics.dllib.lib.nn

import com.intel.webscaleml.nn.tensor.Tensor
import com.intel.webscaleml.nn.tensor.TensorNumericMath.TensorNumeric
import com.intel.analytics.dllib.lib.tensor.Tensor
import com.intel.analytics.dllib.lib.tensor.TensorNumericMath.TensorNumeric

import scala.concurrent.duration.Duration
import scala.concurrent.{Await, Future}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.intel.webscaleml.nn.nn
package com.intel.analytics.dllib.lib.nn

import com.intel.webscaleml.nn.tensor.Tensor
import com.intel.webscaleml.nn.tensor.TensorNumericMath.TensorNumeric
import com.intel.analytics.dllib.lib.tensor.Tensor
import com.intel.analytics.dllib.lib.tensor.TensorNumericMath.TensorNumeric

import scala.collection.mutable.ArrayBuffer
import scala.reflect.ClassTag
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.intel.webscaleml.nn.nn
package com.intel.analytics.dllib.lib.nn

import com.intel.webscaleml.nn.tensor.TensorNumericMath.TensorNumeric
import com.intel.analytics.dllib.lib.tensor.TensorNumericMath.TensorNumeric
import org.apache.commons.lang3.SerializationUtils

import com.intel.webscaleml.nn.tensor.{torch, Tensor}
import com.intel.analytics.dllib.lib.tensor.{torch, Tensor}

import scala.reflect.ClassTag

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.intel.webscaleml.nn.nn
package com.intel.analytics.dllib.lib.nn

import com.intel.webscaleml.nn.tensor.TensorNumericMath.TensorNumeric
import com.intel.webscaleml.nn.tensor.{torch, Tensor}
import com.intel.webscaleml.nn.tensor.RandomGenerator._
import com.intel.analytics.dllib.lib.tensor.TensorNumericMath.TensorNumeric
import com.intel.analytics.dllib.lib.tensor.{torch, Tensor}
import com.intel.analytics.dllib.lib.tensor.RandomGenerator._

import scala.concurrent.duration.{Duration, DurationConversions}
import scala.concurrent.{Await, Future}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.intel.webscaleml.nn.nn
package com.intel.analytics.dllib.lib.nn

sealed trait InitializationMethod

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.intel.webscaleml.nn.nn
package com.intel.analytics.dllib.lib.nn

import com.intel.webscaleml.nn.tensor.TensorNumericMath.TensorNumeric
import com.intel.webscaleml.nn.tensor.{torch, Tensor}
import com.intel.analytics.dllib.lib.tensor.TensorNumericMath.TensorNumeric
import com.intel.analytics.dllib.lib.tensor.{torch, Tensor}
import scala.reflect.ClassTag
import com.intel.webscaleml.nn.tensor.RandomGenerator._
import com.intel.analytics.dllib.lib.tensor.RandomGenerator._

class Linear[@specialized(Float, Double) T: ClassTag](
inputSize: Int,
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.intel.webscaleml.nn.nn
package com.intel.analytics.dllib.lib.nn

import java.util

import com.intel.webscaleml.nn.tensor.TensorNumericMath.TensorNumeric
import com.intel.webscaleml.nn.tensor.{Tensor, torch}
import com.intel.analytics.dllib.lib.tensor.TensorNumericMath.TensorNumeric
import com.intel.analytics.dllib.lib.tensor.{Tensor, torch}

import scala.concurrent.duration.Duration
import scala.concurrent.{Await, Future}
Loading