Skip to content

May I ask if the multiple inputs in PPQ can be tuples #598

Description

@chenchen772

Hi, I'd like to ask, can the type of multiple inputs be a tuple? If I modify assert, will it affect the model results? When I run the program, the following will appear:
AssertionError: Input format misunderstood. Except either dict, list or tensor; while <class 'tuple'> was given.

Will there be any adverse effects on modifying the inputs type in the following function?
def quantize_torch_model(
model: torch.nn.Module,
calib_dataloader: DataLoader,
calib_steps: int,
input_shape: List[int],
platform: TargetPlatform,
input_dtype: torch.dtype = torch.float,
setting: QuantizationSetting = None,
collate_fn: Callable = None,
inputs: List[Any] = None,
do_quantize: bool = True,
onnx_export_file: str = 'onnx.model',
device: str = 'cuda',
verbose: int = 0,
) -> BaseGraph:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions