Skip to content

Commit

Permalink
Revise eps_pri definition
Browse files Browse the repository at this point in the history
The absolute error term in the Convergence criteria should be
sqrt(pixel_count), not pixel_count.
  • Loading branch information
antonysigma committed Jan 12, 2025
1 parent 4d890cc commit 6934b4e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion proximal/halide/src/algorithm/linearized-admm.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ computeConvergence(const Func& v, const FuncTuple<N>& z, const FuncTuple<N>& u,

const Func Kv_norm = normSquared(Kv, output_dimensions);
const Func z_norm = normSquared(z, output_dimensions);
const Expr eps_pri = eps_rel * sqrt(max(Kv_norm(), z_norm())) + output_size * eps_abs;
const Expr eps_pri = eps_rel * sqrt(max(Kv_norm(), z_norm())) + std::sqrt(float(output_size)) * eps_abs;

const Func KTu_norm = normSquared(KTu, input_dimensions);
const Expr eps_dual =
Expand Down
4 changes: 2 additions & 2 deletions proximal/halide/src/user-problem/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ solver_bin = custom_target(
'autoscheduler.balance=40',

'n_iter=1', # number of ADMM iterations before checking convergence
'mu=0.333', # Problem scaling factor. Defaults to 1 / sqrt( || K || ).
'lmb=3.0', # Problem scaling factor. Defaults to sqrt( || K || ).
'mu=0.11111', # Problem scaling factor. Defaults to 1 / sqrt( || K || ).
'lmb=1.0', # Problem scaling factor. Defaults to sqrt( || K || ).
],
build_by_default: true,
)
Expand Down
2 changes: 1 addition & 1 deletion proximal/halide/src/user-problem/problem-definition.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const std::array<ParameterizedProx, problem_config::psi_size> psi_fns{

return proxIsoL1(u, output_width, output_height, theta);
},
/* .alpha = */ 0.1f,
/* .alpha = */ 5e-2f,
/* .beta = */ 1.0f,
/* .gamma = */ 0.0f,
/* ._c = */ 0.0f,
Expand Down

0 comments on commit 6934b4e

Please sign in to comment.