It padded even thought mode was error

This commit is contained in:
mcDandy
2026-01-22 13:40:01 +01:00
parent 1294bfe15e
commit 63a0c22da3
+2
View File
@@ -132,6 +132,8 @@ def normalize_to_common_shape(*tensors, mode="pad"):
- mode="pad": Pad with zeros to the max shape.
- mode="tile": Tile to match (or exceed) dimensions, then truncate excess.
"""
if mode not in ("pad", "tile"):
return tensors
valid_tensors = [t for t in tensors if torch.is_tensor(t)]
if len(valid_tensors) <= 1:
return tensors