| 124 | """ |
| 125 | |
| 126 | def __init__(self, *kargs, bias=True): |
| 127 | super(LinearLayer_Compress, self).__init__(*kargs, bias=bias) |
| 128 | self.sparse_pruning_method = None |
| 129 | self.row_pruning_method = None |
| 130 | self.head_pruning_method = None |
| 131 | self.activation_quantization_method = None |
| 132 | self.weight.start_bits = None |
| 133 | self.weight.target_bits = None |
| 134 | self.weight.q_period = None |
| 135 | self.weight_quantization_enabled_in_forward = False |
| 136 | self.weight_quantization_enabled = False |
| 137 | self.sparse_pruning_enabled = False |
| 138 | self.row_pruning_enabled = False |
| 139 | self.head_pruning_enabled = False |
| 140 | self.activation_quantization_enabled = False |
| 141 | |
| 142 | def extra_repr(self): |
| 143 | return 'in_features={}, out_features={}, bias={}, sparse pruning={}, row pruning={}, head pruning={}, activation quantization={}, weight_quantization={}'.format( |