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

Function load_calibration_dataset

ppq/samples/quantize_caffe_model.py:17–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15MODEL_PATH = 'Models/model.caffemodel' # For successfully loading caffe model, .caffemodel file is required.
16
17def load_calibration_dataset() -> Iterable:
18 return [torch.rand(size=INPUT_SHAPE) for _ in range(32)]
19
20def collate_fn(batch: torch.Tensor) -> torch.Tensor:
21 return batch.to(DEVICE)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected