def _is_1(expr):
    try:
        v = opt.get_scalar_constant_value(expr)
        return numpy.allclose(v, 1)
    except tensor.NotScalarConstantError:
        return False
Returns
dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/tensor/nnet/sigm.py/_is_1