MCPcopy
hub / github.com/OpenPPL/ppq / load_calibration_dataset

Function load_calibration_dataset

ppq/samples/quantize_torch_model.py:15–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13PLATFORM = TargetPlatform.PPL_CUDA_INT8 # identify a target platform for your network.
14
15def load_calibration_dataset() -> Iterable:
16 return [torch.rand(size=INPUT_SHAPE) for _ in range(32)]
17
18def collate_fn(batch: torch.Tensor) -> torch.Tensor:
19 return batch.to(DEVICE)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected