mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
quantize_rnn_modules in ensemble_export (#20365)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/20365 Enable quantization of `torch.nn.LSTM` module in the decoder of PyTorch natively exported beam search models. Reviewed By: jmp84 Differential Revision: D15260631 fbshipit-source-id: bbdd3a30c2c2110986eb7aa7ff11ce1c9090ddf4
This commit is contained in:
committed by
Facebook Github Bot
parent
a0c2829194
commit
a4ae689636
@ -378,7 +378,7 @@ class QuantizedLSTM(QuantizedRNNBase):
|
||||
self.check_forward_args(input, hx, batch_sizes)
|
||||
assert batch_sizes is None
|
||||
result = _VF.quantized_lstm(input, hx, self._get_all_weights(), self.bias, self.num_layers,
|
||||
self.dropout, self.training, self.bidirectional,
|
||||
float(self.dropout), self.training, self.bidirectional,
|
||||
self.batch_first)
|
||||
|
||||
output = result[0]
|
||||
|
Reference in New Issue
Block a user