Skip to content

Commit 7860e63

Browse files
authored
ad in_channels (#205)
1 parent bb123af commit 7860e63

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

onnx_diagnostic/tasks/image_text_to_text.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ def random_input_kwargs(config: Any) -> Tuple[Dict[str, Any], Callable]:
348348
"vision_config",
349349
)
350350
text_config = False
351-
check_hasattr(config.vision_config, ("num_channels", "in_chans"))
351+
check_hasattr(config.vision_config, ("num_channels", "in_chans", "in_channels"))
352352
kwargs = dict(
353353
batch_size=2,
354354
sequence_length=43,
@@ -421,7 +421,9 @@ def random_input_kwargs(config: Any) -> Tuple[Dict[str, Any], Callable]:
421421
else config.vision_config.image_size
422422
),
423423
num_channels=(
424-
3 if config is None else _pick(config.vision_config, "num_channels", "in_chans")
424+
3
425+
if config is None
426+
else _pick(config.vision_config, "num_channels", "in_chans", "in_channels")
425427
),
426428
pad_token_id=(
427429
0

0 commit comments

Comments
 (0)