def SparseSoftmaxCrossEntropyWithLogits(features, labels, is_grad=False, sens=1.0):
    'sparse softmax cross entropy with logits'
    if is_grad:
        return loss_ad.sparse_softmax_cross_entropy_with_logits_ad(labels, features, reduction='mean', grad_scale=sens)
    return loss.sparse_softmax_cross_entropy_with_logits(labels, features, reduction='mean')
sparse softmax cross entropy with logits
def SparseSoftmaxCrossEntropyWithLogits(features, labels, is_grad=False, sens=1.0):
    
    if is_grad:
        return loss_ad.sparse_softmax_cross_entropy_with_logits_ad(labels, features, reduction='mean', grad_scale=sens)
    return loss.sparse_softmax_cross_entropy_with_logits(labels, features, reduction='mean')