code: def decode(self, encoded_values_tensor, max_length=100):
      ret = []
      with torch.no_grad():
          for decoder_hiddens in encoded_values_tensor:
              decoder_hidden = torch.FloatTensor(
                  [[decoder_hiddens.tolist()]]
              ).to(self.device)
  
              decoder_input = torch.tensor(
                  [[SOS_token]], device=self.device
              )  # SOS
  
              decoded_words = []
  
              for di in range(max_length):
                  decoder_output, decoder_hidden = self._decoder(
                      decoder_input, decoder_hidden
                  )
  
                  topv, topi = decoder_output.data.topk(1)
                  if topi.item() == EOS_token:
                      decoded_words.append("<EOS>")
                      break
                  else:
                      decoded_words.append(
                          self._output_lang.index2word[topi.item()]
                      )
  
                  decoder_input = topi.squeeze().detach()
  
              ret.append(" ".join(decoded_words))
  
      return ret
  
file_path: lightwood/lightwood/encoder/text/rnn.py
imports: from lightwood.encoder.text.helpers.rnn_helpers import *
  from lightwood.encoder.base import BaseEncoder
  from lightwood.helpers.log import log
  import math
label_desc: Use image node_id 4 for calling the RnnEncoder obj's underlying member method code with example usage: obj.decode(encoded_values_tensor, max_length) and returns: ret