Skip to content

Commit

Permalink
Fixed initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
lezcano committed Jan 30, 2019
1 parent f493b78 commit f20526f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
__pycache__
mnist
4 changes: 1 addition & 3 deletions initialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ def cayley_init(n):
return create_diag(s, n)

def create_diag(s, n):
diag = np.zeros(n)
diag = np.zeros(n-1)
diag[::2] = s
if n % 2 == 0:
diag = diag[:-1]
A_init = np.diag(diag, k=1)
A_init = A_init - A_init.T
return A_init.astype(np.float32)

0 comments on commit f20526f

Please sign in to comment.