Update hf_model.py
Browse files- hf_model.py +1 -1
hf_model.py
CHANGED
|
@@ -182,7 +182,7 @@ class Triad(nn.Module):
|
|
| 182 |
assert image is not None or audio is not None or text_list is not None, "At least one modality must be provided"
|
| 183 |
if image is not None: assert image is not str, "Frames should be a path to an image"
|
| 184 |
if audio is not None:
|
| 185 |
-
assert isinstance(audio, torch.Tensor) and
|
| 186 |
if text_list is not None:
|
| 187 |
assert isinstance(text_list, list) and len(text_list) == 1, "Text list must be a list of strings of length 1"
|
| 188 |
if image is not None:
|
|
|
|
| 182 |
assert image is not None or audio is not None or text_list is not None, "At least one modality must be provided"
|
| 183 |
if image is not None: assert image is not str, "Frames should be a path to an image"
|
| 184 |
if audio is not None:
|
| 185 |
+
assert isinstance(audio, torch.Tensor) and len(audio.shape) == 2, "Audio must be a PyTorch tensor of shape (B, T)"
|
| 186 |
if text_list is not None:
|
| 187 |
assert isinstance(text_list, list) and len(text_list) == 1, "Text list must be a list of strings of length 1"
|
| 188 |
if image is not None:
|