From 9771c88860a1a5bbf7769182e604fb730f676621 Mon Sep 17 00:00:00 2001 From: MikhailKazekin Date: Thu, 18 Jun 2020 21:37:05 -0400 Subject: [PATCH] Update lstm.py Fix original issue https://github.com/huggingface/torchMoji/issues/34 --- torchmoji/lstm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchmoji/lstm.py b/torchmoji/lstm.py index 67ed0e1..7b6b745 100644 --- a/torchmoji/lstm.py +++ b/torchmoji/lstm.py @@ -75,7 +75,7 @@ def reset_parameters(self): def forward(self, input, hx=None): is_packed = isinstance(input, PackedSequence) if is_packed: - input, batch_sizes = input + input, batch_sizes, _, _ = input max_batch_size = batch_sizes[0] else: batch_sizes = None