Skip to content

Commit

Permalink
Fix, wrong condition left in from testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjc committed Mar 10, 2016
1 parent 29147a3 commit 3547a6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doodle.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def evaluate(self, Xn):
current_img = Xn.reshape(self.content_image.shape).astype(np.float32) - self.model.pixel_mean
grads, *losses = self.compute_grad_and_losses(current_img, self.content_map)

if not np.isnan(grads).any():
if np.isnan(grads).any():
raise RuntimeError("Optimization diverged; try using different device or parameters.")

# Use gradients as an estimate for overall quality.
Expand Down

0 comments on commit 3547a6d

Please sign in to comment.