

def fast_inplace_check(inputs):
    '\n    Return the variables in inputs that are posible candidate for as inputs of\n    inplace operation.\n\n    Parameters\n    ----------\n    inputs : list\n        Inputs Variable that you want to use as inplace destination.\n\n    '
    fgraph = inputs[0].fgraph
    Supervisor = theano.compile.function_module.Supervisor
    protected_inputs = [f.protected for f in fgraph._features if isinstance(f, Supervisor)]
    protected_inputs = sum(protected_inputs, [])
    protected_inputs.extend(fgraph.outputs)
    inputs = [i for i in inputs if ((not isinstance(i, graph.Constant)) and (not fgraph.destroyers(i)) and (i not in protected_inputs))]
    return inputs

dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/gof/destroyhandler.py fast_inplace_check/original