@gof.local_optimizer([tensor.sub])
def local_1msigmoid(node):
    if node.op == tensor.sub:
        sub_l, sub_r = node.inputs
        if len(sub_r.clients) > 1:
            return  # graph is using both sigm and 1-sigm
        if sub_r.owner and sub_r.owner.op == sigmoid:
            try:
                val_l = opt.get_scalar_constant_value(sub_l)
            except Exception:
                return
            if numpy.allclose(numpy.sum(val_l), 1):
                return [sigmoid(-sub_r.owner.inputs[0])]
Show the image stored in X on the canvas.
dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/tensor/nnet/sigm.py/local_1msigmoid--crossover with--dataset/ETHPy150Open SheffieldML/GPy/GPy/plotting/abstract_plotting_library.py/AbstractPlottingLibrary.imshow