Skip to content

Commit

Permalink
turn off tolerance checks by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Niru Maheswaranathan committed Oct 7, 2015
1 parent fe3997e commit 73def17
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion descent/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'every': 1,
'iter': True,
'obj': True,
'gradnorm': True,
'gradnorm': False,
'runtime': True,
'width': 15,
'spec': '5g'
Expand Down
2 changes: 1 addition & 1 deletion descent/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(self, theta_init):

self.theta = deepcopy(theta_init)

def run(self, maxiter=1e3, obj_tol=1e-8, param_tol=1e-5):
def run(self, maxiter=1e3, obj_tol=-1, param_tol=-1):

self.maxiter = int(maxiter)
starting_iteration = len(self)
Expand Down
9 changes: 8 additions & 1 deletion descent/proxops.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,17 @@ def __init__(self, axis, gamma):

def __call__(self, x0, rho):

# Apply Laplacian smoothing
# Apply Laplacian smoothing (l2 norm on the parameters multiplied by
# the laplacian)
n = x0.shape[self.axis]
lap_op = spdiags([(2 + rho / self.gamma) * np.ones(n), -1 * np.ones(n), -1 * np.ones(n)], [0, -1, 1], n, n, format='csc')

x_out = np.rollaxis(spsolve(self.gamma * lap_op, rho * np.rollaxis(x0, self.axis, 0)), self.axis, 0)

return x_out

def objective(self, x):
n = x.shape[self.axis]
# lap_op = spdiags([(2 + rho / self.gamma) * np.ones(n), -1 * np.ones(n), -1 * np.ones(n)], [0, -1, 1], n, n, format='csc')
# TODO: add objective for this operator
return 0

0 comments on commit 73def17

Please sign in to comment.