(self, prediction, data_batch, mask)
For a batch of stories and the corresponding network output, it prints the first story and its output.
        It prints out the story words (with asterisks for padding if there was padding), the network output converted
        to words and the correct output converted to words.

        :param prediction:
        :param data_batch:
        :param mask:
        :return:
For a batch of stories and the corresponding network output, it prints the first story and its output.
        It prints out the story words (with asterisks for padding if there was padding), the network output converted
        to words and the correct output converted to words.
For a batch of stories and the corresponding network output it prints the first story and its output . It prints out the story words ( with asterisks for padding if there was padding ) the network output converted to words and the correct output converted to words .
def display_output(self, prediction, data_batch, mask):
        """
        For a batch of stories and the corresponding network output, it prints the first story and its output.
        It prints out the story words (with asterisks for padding if there was padding), the network output converted
        to words and the correct output converted to words.

        :param prediction:
        :param data_batch:
        :param mask:
        :return:
        """
        # taking just the first story in the batch
        prediction = prediction[:1, :, :]
        mask = mask[:1, :, :]
        data_batch = data_batch[:, :1, :, :]

        text = self.indices_to_words([np.argmax(i) for i in data_batch[0][0]])

        correct_indices = bAbITask.tensor_to_indices(data_batch[1], mask)
        out_indices = bAbITask.tensor_to_indices(prediction, mask)

        correct_words = self.indices_to_words(correct_indices)
        out_words = self.indices_to_words(out_indices)

        print(text)
        print("Output:", out_words)
        print("Correct:", correct_words)
        print("-------------------------------------------------------------------\n")
def display_output ( self , prediction , data_batch , mask ) : # taking just the first story in the batch prediction = prediction [ : 1 , : , : ] mask = mask [ : 1 , : , : ] data_batch = data_batch [ : , : 1 , : , : ] text = self . indices_to_words ( [ np . argmax ( i ) for i in data_batch [ 0 ] [ 0 ] ] ) correct_indices = bAbITask . tensor_to_indices ( data_batch [ 1 ] , mask ) out_indices = bAbITask . tensor_to_indices ( prediction , mask ) correct_words = self . indices_to_words ( correct_indices ) out_words = self . indices_to_words ( out_indices ) print ( text ) print ( "Output:" , out_words ) print ( "Correct:" , correct_words ) print ( "-------------------------------------------------------------------\n" )