(self, input_batch, seqLen_batch, label_batch=None)
return feed_dict
Creates the feed_dict for training the given step.

        A feed_dict takes the form of:

        feed_dict = {
            <placeholder>: <tensor of values to be passed for placeholder>,
            ....
        }

        If label_batch is None, then no labels are added to feed_dict.

        Hint: The keys for the feed_dict should be a subset of the placeholder
              tensors created in add_placeholders.

        Args:
          input_batch: A batch of input data.
          seqLen_batch: the length of sentence, shape(batch_size)
          label_batch: A batch of label data.
        Returns:
          feed_dict: The feed dictionary mapping from placeholders to values.
Creates the feed_dict for training the given step.
Creates the feed_dict for training the given step .
def create_feed_dict(self, input_batch, seqLen_batch, label_batch=None):
        """Creates the feed_dict for training the given step.

        A feed_dict takes the form of:

        feed_dict = {
            <placeholder>: <tensor of values to be passed for placeholder>,
            ....
        }

        If label_batch is None, then no labels are added to feed_dict.

        Hint: The keys for the feed_dict should be a subset of the placeholder
              tensors created in add_placeholders.

        Args:
          input_batch: A batch of input data.
          seqLen_batch: the length of sentence, shape(batch_size)
          label_batch: A batch of label data.
        Returns:
          feed_dict: The feed dictionary mapping from placeholders to values.
        """

        if label_batch is None:
            holder_list = [self.ph_input, self.ph_seqLen, self.ph_drop]
            feed_list = (input_batch, seqLen_batch, self.config.dropout)
        else:
            holder_list = [self.ph_input, self.ph_label, self.ph_seqLen, self.ph_drop]
            feed_list = (input_batch, label_batch, seqLen_batch, self.config.dropout)

        feed_dict = dict(zip(holder_list, feed_list))
        return feed_dict
def create_feed_dict ( self , input_batch , seqLen_batch , label_batch = None ) : if label_batch is None : holder_list = [ self . ph_input , self . ph_seqLen , self . ph_drop ] feed_list = ( input_batch , seqLen_batch , self . config . dropout ) else : holder_list = [ self . ph_input , self . ph_label , self . ph_seqLen , self . ph_drop ] feed_list = ( input_batch , label_batch , seqLen_batch , self . config . dropout ) feed_dict = dict ( zip ( holder_list , feed_list ) ) return feed_dict