Skip to content

Commit b70f957

Browse files
committed
zero
1 parent f7c4208 commit b70f957

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGELOGS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Change Logs
44
0.4.0
55
+++++
66

7+
* :pr:`52`: add support for zero-shot-image-classification
78
* :pr:`50`: add support for onnxruntime fusion
89
* :pr:`48`: add support for EncoderDecoderCache, test with openai/whisper-tiny
910
* :pr:`45`: improve change_dynamic_dimension to fix some dimensions

onnx_diagnostic/torch_models/hghub/model_inputs.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,10 @@ def random_input_kwargs(config: Any, task: str) -> Tuple[Dict[str, Any], Callabl
279279
)
280280
fct = get_inputs_for_image_classification # type: ignore
281281
elif task == "zero-shot-image-classification":
282-
check_hasattr(config, "vision_config", "text_config")
283-
check_hasattr(config.vision_config, "image_size", "num_channels")
284-
check_hasattr(config.text_config, "vocab_size")
282+
if config is not None:
283+
check_hasattr(config, "vision_config", "text_config")
284+
check_hasattr(config.vision_config, "image_size", "num_channels")
285+
check_hasattr(config.text_config, "vocab_size")
285286
kwargs = dict(
286287
batch_size=2,
287288
batch_size_image=3,

0 commit comments

Comments
 (0)