Skip to content

Commit

Permalink
force R=1 when object count is known
Browse files Browse the repository at this point in the history
Former-commit-id: e5c7498f5be4b747f61daef3481b2606bcdb60d6
  • Loading branch information
Javi Ribera committed Nov 5, 2018
1 parent dcb57d3 commit 3fd4ca4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion object-locator/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ def val_losses(self, terms, iteration_number, terms_legends=None):
curated_terms = []
for term in terms:
if isinstance(term, numbers.Number):
curated_term = torch.tensor([term])
curated_term = torch.tensor([term],
dtype=torch.get_default_dtype())
elif isinstance(term, torch.Tensor):
curated_term = term
else:
Expand Down
3 changes: 2 additions & 1 deletion object-locator/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,8 @@
judge.rmse,
judge.mape,
judge.coeff_of_determination,
judge.pearson_corr,
judge.pearson_corr \
if not np.isnan(judge.pearson_corr) else 1,
judge.precision,
judge.recall),
iteration_number=epoch,
Expand Down

0 comments on commit 3fd4ca4

Please sign in to comment.