def fast_inplace_check(inputs):
 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

def fast_inplace_check ( inputs ) : 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
return the variables in inputs that are posible candidate for as inputs of inplace operation .