@opt.register_specialize('stabilize', 'fast_compile')
@gof.local_optimizer([tensor.Elemwise])
def local_logsoftmax(node):
    if (isinstance(node.op, tensor.Elemwise) and
            isinstance(node.op.scalar_op, scalar.basic.Log) and
            len(node.inputs) == 1 and
            node.inputs[0].owner is not None and
            isinstance(node.inputs[0].owner.op, Softmax)):
        inVars = node.inputs[0].owner.inputs[0]
        new_op = LogSoftmax()
        ret = new_op(inVars)
        ret.tag.values_eq_approx = values_eq_approx_remove_inf
        return [ret]
Decreases the indentation level.
dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/tensor/nnet/nnet.py/local_logsoftmax--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/syslog_ng.py/_decrease_indent