Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 8, 2022
1 parent 6e95772 commit 34d3d50
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 2 deletions.
Empty file modified .github/CODE_OF_CONDUCT.md
100755 → 100644
Empty file.
Empty file modified .github/CONTRIBUTING.md
100755 → 100644
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/bug_report.md
100755 → 100644
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/documentation.md
100755 → 100644
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/feature_request.md
100755 → 100644
Empty file.
Empty file modified .github/PULL_REQUEST_TEMPLATE.md
100755 → 100644
Empty file.
Empty file modified README.md
100755 → 100644
Empty file.
12 changes: 10 additions & 2 deletions tests/image/test_psnr.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,21 @@ def test_psnr_functional(self, preds, target, sk_metric, data_range, base, reduc
@pytest.mark.xfail(reason="PSNR metric does not support cpu + half precision")
def test_psnr_half_cpu(self, preds, target, data_range, reduction, dim, base, sk_metric):
self.run_precision_test_cpu(
preds, target, PSNR, peak_signal_noise_ratio, {"data_range": data_range, "base": base, "reduction": reduction, "dim": dim}
preds,
target,
PSNR,
peak_signal_noise_ratio,
{"data_range": data_range, "base": base, "reduction": reduction, "dim": dim},
)

@pytest.mark.skipif(not torch.cuda.is_available(), reason="test requires cuda")
def test_psnr_half_gpu(self, preds, target, data_range, reduction, dim, base, sk_metric):
self.run_precision_test_gpu(
preds, target, PSNR, peak_signal_noise_ratio, {"data_range": data_range, "base": base, "reduction": reduction, "dim": dim}
preds,
target,
PSNR,
peak_signal_noise_ratio,
{"data_range": data_range, "base": base, "reduction": reduction, "dim": dim},
)


Expand Down

0 comments on commit 34d3d50

Please sign in to comment.