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

Method __init__

ppq/IR/quantize.py:185–196  ·  view source on GitHub ↗
(self, convert_from: Variable)

Source from the content-addressed store, hash-verified

183
184class QuantableVariable(Variable):
185 def __init__(self, convert_from: Variable) -> None:
186 super().__init__(
187 name = convert_from.name,
188 dest_ops = convert_from.dest_ops.copy(),
189 source_op = convert_from.source_op,
190 value = convert_from.value,
191 is_parameter = convert_from.is_parameter,
192 shape = convert_from.shape,
193 dtype = convert_from.dtype)
194 self._fp32_value = None
195 if convert_from.value is not None:
196 self._fp32_value = convert_any_to_torch_tensor(convert_from.value, device='cpu')
197
198 @ property
199 def stored_value(self) -> Any:

Callers

nothing calls this directly

Calls 3

__init__Method · 0.45
copyMethod · 0.45

Tested by

no test coverage detected