Skip to content

Commit

Permalink
fixed indentation error in gradient descent inital estimation
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien-Sahli committed May 11, 2023
1 parent 5f53e8d commit 04ed236
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lensless/gradient_descent.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,9 @@ def reset(self):
self._image_est = np.ones(self._psf_shape, dtype=self._dtype)
else:
assert self._initial_est.shape == self._psf_shape

psf_flat = self._psf.reshape(-1, self._psf_shape[3])
pixel_start = (np.max(psf_flat, axis=0) + np.min(psf_flat, axis=0)) / 2
self._image_est *= pixel_start
psf_flat = self._psf.reshape(-1, self._psf_shape[3])
pixel_start = (np.max(psf_flat, axis=0) + np.min(psf_flat, axis=0)) / 2
self._image_est *= pixel_start

# set step size as < 2 / lipschitz
Hadj_flat = self._convolver._Hadj.reshape(-1, self._psf_shape[3])
Expand Down

0 comments on commit 04ed236

Please sign in to comment.