Skip to content

Commit c5c91e4

Browse files
committed
[fix] inequality to check the range of minimum and maximum values
1 parent e4ae491 commit c5c91e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compressai_vision/pipelines/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def _prep_features_to_dump(features, n_bits, datacatalog_name):
215215
data_features = {}
216216
for key, data in features["data"].items():
217217
assert (
218-
data.min() > minv and data.max() < maxv
218+
data.min() >= minv and data.max() <= maxv
219219
), f"{data.min()} should be greater than {minv} and {data.max()} should be less than {maxv}"
220220
out, _ = min_max_normalization(data, minv, maxv, bitdepth=n_bits)
221221
data_features[key] = out.to(torch.uint8)

0 commit comments

Comments
 (0)