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

Function collate_fn

ppq/samples/Tutorial/fusion.py:36–37  ·  view source on GitHub ↗
(batch: torch.Tensor)

Source from the content-addressed store, hash-verified

34CALIBRATION = load_calibration_dataset()
35
36def collate_fn(batch: torch.Tensor) -> torch.Tensor:
37 return batch.to(DEVICE)
38
39model = torchvision.models.mobilenet.mobilenet_v2(pretrained=True)
40model = model.to(DEVICE)

Callers 1

fp8_sample.pyFile · 0.50

Calls 1

toMethod · 0.80

Tested by

no test coverage detected