Skip to content

Commit

Permalink
np.infty -> np.inf
Browse files Browse the repository at this point in the history
  • Loading branch information
ekorman committed Jul 25, 2024
1 parent 0104fca commit 1ea5661
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions neurve/core/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ def log_dict(self, d):
def train(
self,
n_epochs=None,
save_ckpt_freq=np.infty,
eval_freq=np.infty,
save_ckpt_freq=np.inf,
eval_freq=np.inf,
n_global_steps=None,
):
"""Method for training. Saves tensorboard output to self.out_path and
Expand Down
2 changes: 1 addition & 1 deletion neurve/metric_learning/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def log_metrics(self, dists, all_y):
all_y : np.ndarray
"""
all_y = np.ones((dists.shape[0], 1)) @ all_y.reshape(1, -1)
np.fill_diagonal(dists, np.infty)
np.fill_diagonal(dists, np.inf)
sorted_indices = np.argsort(dists)

# sort dists and labels by distance
Expand Down

0 comments on commit 1ea5661

Please sign in to comment.