Skip to content

Commit

Permalink
Removed shape check from mask
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhinavTuli authored Mar 7, 2021
1 parent b8a0e76 commit 57a2d75
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions hub/schema/mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def __init__(
If default value is chosen, automatically detects how to split into chunks
"""
self._check_shape(shape)
super().__init__(
shape,
"bool_",
Expand All @@ -51,13 +50,6 @@ def __init__(
compressor=compressor,
)

def _check_shape(self, shape):
"""Check if provided shape maches mask characteristics."""
if len(shape) != 3 or shape[-1] != 1:
raise ValueError(
"Wrong mask shape provided, should be of the format (height, width, 1) where height and width are integers or None"
)

def __str__(self):
out = super().__str__()
out = "Mask" + out[6:]
Expand Down

0 comments on commit 57a2d75

Please sign in to comment.