Skip to content

Commit

Permalink
docs: 🦺 add assertion for brisque
Browse files Browse the repository at this point in the history
  • Loading branch information
chaofengc committed Sep 25, 2023
1 parent 56b5bc4 commit 4e2c707
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pyiqa/archs/brisque_arch.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ def __init__(self,
# This check might look redundant because kernel size is checked within the brisque function anyway.
# However, this check allows to fail fast when the loss is being initialised and training has not been started.
assert kernel_size % 2 == 1, f'Kernel size must be odd, got [{kernel_size}]'
assert test_y_channel, f'Only [test_y_channel=True] is supported for current BRISQUE model, which is taken directly from official codes: https://github.com/utlive/BRISQUE.'

self.kernel_sigma = kernel_sigma
self.test_y_channel = test_y_channel
Expand Down

0 comments on commit 4e2c707

Please sign in to comment.