MCPcopy Create free account
hub / github.com/pytorch/executorch / get_uint8_tensor_spec

Function get_uint8_tensor_spec

backends/example/example_quantizer.py:25–33  ·  view source on GitHub ↗
(observer_or_fake_quant_ctr)

Source from the content-addressed store, hash-verified

23
24
25def get_uint8_tensor_spec(observer_or_fake_quant_ctr):
26 return QuantizationSpec(
27 dtype=torch.uint8,
28 quant_min=0,
29 quant_max=255,
30 qscheme=torch.per_tensor_affine,
31 is_dynamic=False,
32 observer_or_fake_quant_ctr=observer_or_fake_quant_ctr,
33 )
34
35
36@dataclass

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected