MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / __init__

Method __init__

deepspeed/compression/basic_layer.py:28–38  ·  view source on GitHub ↗
(self, act_range_momentum=0.95, quant_mode='symmetric')

Source from the content-addressed store, hash-verified

26 """
27
28 def __init__(self, act_range_momentum=0.95, quant_mode='symmetric'):
29 super(QuantAct, self).__init__()
30
31 self.act_range_momentum = act_range_momentum
32 self.quant_mode = quant_mode
33 if quant_mode == 'symmetric':
34 self.act_function = SymQuantizer.apply
35 else:
36 self.act_function = AsymQuantizer.apply
37
38 self.register_buffer('x_min_max', torch.zeros(2))
39
40 def forward(self, x, num_bits, *args):
41 """

Callers 5

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected