original_docstring: 
          Decoding function:
          generate new decoder output based on the current input and current decoder state
          the decoder state is updated in the process
          :param streaming:
          :param input_t: the input word index at time t
          :param decoder_state: object DecoderState containing the buffers required for decoding
          :return: a dictionary containing: log-prob output and the attention coverage
          
docstring: Decoding function:
  generate new decoder output based on the current input and current decoder state
  the decoder state is updated in the process
docstring_tokens: Decoding function : generate new decoder output based on the current input and current decoder state the decoder state is updated in the process
code: def step(self, input_t, decoder_state, streaming=False):
          """
          Decoding function:
          generate new decoder output based on the current input and current decoder state
          the decoder state is updated in the process
          :param streaming:
          :param input_t: the input word index at time t
          :param decoder_state: object DecoderState containing the buffers required for decoding
          :return: a dictionary containing: log-prob output and the attention coverage
          """
  
          output_dict = self.decoder.step(input_t, decoder_state, streaming=streaming)
          output_dict['src'] = decoder_state.src.transpose(0, 1)
  
          # squeeze to remove the time step dimension
          if isinstance(self.generator, nn.ModuleList):
              output_dict = self.generator[0](output_dict)
          else:
              output_dict = self.generator(output_dict)
          log_prob = output_dict['logits'].squeeze(0)
  
          # the key 'softmaxed' should be included in generators.
          # The 'normal linear + CE' doesn't need softmax
          if output_dict['softmaxed'] is False:
              log_prob = F.log_softmax(log_prob, dim=-1, dtype=torch.float32)
  
          coverage = output_dict['coverage']
  
          try:
              last_coverage = coverage[:, -1, :].squeeze(1)
          except TypeError:
              last_coverage = None
  
          output_dict['log_prob'] = log_prob
          output_dict['coverage'] = last_coverage
  
          return output_dict
code_tokens: def step ( self , input_t , decoder_state , streaming = False ) : output_dict = self . decoder . step ( input_t , decoder_state , streaming = streaming ) output_dict [ 'src' ] = decoder_state . src . transpose ( 0 , 1 ) if isinstance ( self . generator , nn . ModuleList ) : output_dict = self . generator [ 0 ] ( output_dict ) else : output_dict = self . generator ( output_dict ) log_prob = output_dict [ 'logits' ] . squeeze ( 0 ) if output_dict [ 'softmaxed' ] is False : log_prob = F . log_softmax ( log_prob , dim = - 1 , dtype = torch . float32 ) coverage = output_dict [ 'coverage' ] try : last_coverage = coverage [ : , - 1 , : ] . squeeze ( 1 ) except TypeError : last_coverage = None output_dict [ 'log_prob' ] = log_prob output_dict [ 'coverage' ] = last_coverage return output_dict
short_docstring: Decoding function:
  generate new decoder output based on the current input and current decoder state
  the decoder state is updated in the process
short_docstring_tokens: Decoding function : generate new decoder output based on the current input and current decoder state the decoder state is updated in the process
comment: """
          Decoding function:
          generate new decoder output based on the current input and current decoder state
          the decoder state is updated in the process
          :param streaming:
          :param input_t: the input word index at time t
          :param decoder_state: object DecoderState containing the buffers required for decoding
          :return: a dictionary containing: log-prob output and the attention coverage
          """$SEP$# squeeze to remove the time step dimension$SEP$# the key 'softmaxed' should be included in generators.$SEP$# The 'normal linear + CE' doesn't need softmax