class_docstr: End-To-End Memory Network.
class_docstr_tok: ["End-To-End","Memory","Network","."]
docstr: Runs the training algorithm over the passed batch
  
  Args:
      stories: Tensor (None, memory_size, sentence_size)
      queries: Tensor (None, sentence_size)
      answers: Tensor (None, vocab_size)
  
  Returns:
      loss: floating-point number, the loss computed for the batch
docstr_tok: ["Runs","the","training","algorithm","over","the","passed","batch","Args",":","stories",":","Tensor","(","None",",","memory_size",",","sentence_size",")","queries",":","Tensor","(","None",",","sentence_size",")","answers",":","Tensor","(","None",",","vocab_size",")","Returns",":","loss",":","floating-point","number",",","the","loss","computed","for","the","batch"]
code: def batch_fit(self, stories, queries, answers, cands):
      """Runs the training algorithm over the passed batch
  
      Args:
          stories: Tensor (None, memory_size, sentence_size)
          queries: Tensor (None, sentence_size)
          answers: Tensor (None, vocab_size)
  
      Returns:
          loss: floating-point number, the loss computed for the batch
      """
      feed_dict = {
          self._stories: stories,
          self._queries: queries,
          self._answers: answers,
          self._cands: cands,
      }
      loss, _ = self._sess.run(
          [self.loss_op, self.train_op], feed_dict=feed_dict
      )
  
      return loss
  
file_path: nlp-architect/examples/memn2n_dialogue/memn2n_dialogue.py
imports: from __future__ import absolute_import
  from __future__ import division
  import tensorflow
  from six.moves import range
label_desc: Use image node_id 5 for calling the MemN2N_Dialog obj's underlying member method code with example usage: obj.batch_fit(stories, queries, answers, cands) and returns: loss