Skip to content

Commit

Permalink
add adamax test
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobjinkelly committed Apr 19, 2020
1 parent 8078973 commit 61fc2bf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/optimizers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ def loss(xs):
x0 = (np.ones(2), np.ones((2, 2)))
self._CheckOptimizer(optimizers.sm3, loss, x0, num_iters, step_size)

def testAdaMaxVector(self):
def loss(x): return np.dot(x, x)
x0 = np.ones(2)
num_iters = 100
step_size = 0.1
self._CheckOptimizer(optimizers.adamax, loss, x0, num_iters, step_size)

def testSgdVectorExponentialDecaySchedule(self):
def loss(x): return np.dot(x, x)
x0 = np.ones(2)
Expand Down

0 comments on commit 61fc2bf

Please sign in to comment.