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

Function load_calibration_dataset

ppq/samples/Tutorial/dequantize.py:18–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

dequantize.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected