(self, network_output, correct_output, mask=None)
return tf.reduce_mean(masked)
Mean of the batch cross entropy cost on the masked softmax outputs.
        Mask makes all the outputs of the network which are not marked with the "-" in inputs completely irrelevant.


        :param network_output: tensor of shape [batch_size, time_steps, vector_size]
        :param correct_output: tensor of shape [batch_size, time_steps, vector_size]
        :param mask: 
        :return:
Mean of the batch cross entropy cost on the masked softmax outputs.
        Mask makes all the outputs of the network which are not marked with the "-" in inputs completely irrelevant.
Mean of the batch cross entropy cost on the masked softmax outputs . Mask makes all the outputs of the network which are not marked with the - in inputs completely irrelevant .
def cost(self, network_output, correct_output, mask=None):
        """
        Mean of the batch cross entropy cost on the masked softmax outputs.
        Mask makes all the outputs of the network which are not marked with the "-" in inputs completely irrelevant.


        :param network_output: tensor of shape [batch_size, time_steps, vector_size]
        :param correct_output: tensor of shape [batch_size, time_steps, vector_size]
        :param mask: 
        :return: 
        """
        softmax_cross_entropy = tf.nn.softmax_cross_entropy_with_logits(logits=network_output,
                                                                        labels=correct_output,
                                                                        dim=2)
        masked = softmax_cross_entropy * mask[:, :, 0]
        tf.summary.image("0Masked_SCE", tf.reshape(masked, [1, 1, -1, 1]))
        return tf.reduce_mean(masked)
def cost ( self , network_output , correct_output , mask = None ) : softmax_cross_entropy = tf . nn . softmax_cross_entropy_with_logits ( logits = network_output , labels = correct_output , dim = 2 ) masked = softmax_cross_entropy * mask [ : , : , 0 ] tf . summary . image ( "0Masked_SCE" , tf . reshape ( masked , [ 1 , 1 , - 1 , 1 ] ) ) return tf . reduce_mean ( masked )