Skip to content

Commit

Permalink
Changed to set()0f without initializing a new array first
Browse files Browse the repository at this point in the history
  • Loading branch information
terrytangyuan committed Dec 29, 2015
1 parent baf1279 commit acb82e2
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,19 @@ abstract class Initializer {
}

def _initZero(name: String, arr: NDArray): Unit = {
arr.set(zeros(arr.size))
arr.set(0f)
}

def _initBias(name: String, arr: NDArray): Unit = {
arr.set(zeros(arr.size))
arr.set(0f)
}

def _initGamma(name: String, arr: NDArray): Unit = {
arr.set(ones(arr.size))
arr.set(1f)
}

def _initBeta(name: String, arr: NDArray): Unit = {
arr.set(zeros(arr.size))
arr.set(0f)
}

def _initWeight(name: String, arr: NDArray): Unit
Expand Down

0 comments on commit acb82e2

Please sign in to comment.