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

Method post_forward_hook

ppq/executor/torch.py:34–40  ·  view source on GitHub ↗
(self, outputs: List[torch.Tensor], **kwargs)

Source from the content-addressed store, hash-verified

32 return inputs
33
34 def post_forward_hook(self, outputs: List[torch.Tensor], **kwargs) -> list:
35 for tensor, var in zip(outputs, self._hook_to.outputs):
36 if tensor is not None:
37 var.shape = tensor.shape
38 var.dtype = tensor.dtype
39
40 return outputs
41
42
43class TorchQuantizeDelegator(Callable):

Callers 1

__forwardMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected