(pred, label, end_points)
return classify_loss
pred: B*NUM_CLASSES,
        label: B,
pred: B*NUM_CLASSES,
        label: B,
pred : B * NUM_CLASSES label : B
def get_loss(pred, label, end_points):
    """ pred: B*NUM_CLASSES,
        label: B, """
    loss = tf.nn.sparse_softmax_cross_entropy_with_logits(logits=pred, labels=label)
    classify_loss = tf.reduce_mean(loss)
    tf.summary.scalar("classify loss", classify_loss)
    return classify_loss
def get_loss ( pred , label , end_points ) : loss = tf . nn . sparse_softmax_cross_entropy_with_logits ( logits = pred , labels = label ) classify_loss = tf . reduce_mean ( loss ) tf . summary . scalar ( "classify loss" , classify_loss ) return classify_loss