onnx_diagnostic.tasks.image_classification

onnx_diagnostic.tasks.image_classification.get_inputs(model: Module, config: Any | None, input_width: int, input_height: int, input_channels: int, batch_size: int = 2, dynamic_rope: bool = False, **kwargs)[source]

Generates inputs for task image-classification.

Parameters:
  • model – model to get the missing information

  • config – configuration used to generate the model

  • batch_size – batch size

  • input_channels – input channel

  • input_width – input width

  • input_height – input height

Returns:

dictionary

onnx_diagnostic.tasks.image_classification.random_input_kwargs(config: Any, task: str) Tuple[Dict[str, Any], Callable][source]

Inputs kwargs.

If the configuration is None, the function selects typical dimensions.

onnx_diagnostic.tasks.image_classification.reduce_model_config(config: Any, task: str) Dict[str, Any][source]

Reduces a model size.