Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chenbohua3 committed Apr 18, 2021
1 parent 9c09bf0 commit f31b019
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nni/compression/pytorch/compressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ def quant_backward(tensor, grad_output, quant_type, scale, zero_point, qmin, qma

@staticmethod
def forward(ctx, tensor, quant_type, wrapper, input_tensor=None, **kwargs):
output = quantize_helper(tensor, quant_type, wrapper, **kwargs)
output = quantize_helper(tensor, quant_type, wrapper, input_tensor, **kwargs)

bits = QuantGrad.get_bits_length(wrapper.config, QType_Dict[quant_type])
qmin, qmax = torch.Tensor([0]).to(tensor.device), torch.Tensor([(1 << bits) - 1]).to(tensor.device)
Expand Down

0 comments on commit f31b019

Please sign in to comment.