You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/root/anaconda3/envs/xxxx/lib/python3.8/site-packages/pyiqa/models/inference_model.py", line 79, in is_valid_input
assert x.min() >= 0 and x.max() <= 1, f'Input must be normalized to [0, 1], but got min={x.min():.4f}, max={x.max():.4f}'
AssertionError: Input must be normalized to [0, 1], but got min=0.0000, max=1.0000
The source code
defis_valid_input(self, x):
ifxisnotNone:
assertisinstance(x, torch.Tensor), 'Input must be a torch.Tensor'assertx.dim() ==4, 'Input must be 4D tensor (B, C, H, W)'assertx.shape[1] in [1, 3], 'Input must be RGB or gray image'ifself.check_input_range:
assertx.min() >=0andx.max() <=1, f'Input must be normalized to [0, 1], but got min={x.min():.4f}, max={x.max():.4f}'
I checked the source code, it seems there is a problem when float datatype is given without eps considered.
The text was updated successfully, but these errors were encountered:
The error output
The source code
I checked the source code, it seems there is a problem when float datatype is given without eps considered.
The text was updated successfully, but these errors were encountered: