def put_hook(variable, hook_fn, *args):
 return printing.Print(global_fn=(lambda _, x: hook_fn(x, *args)))(variable)

def put_hook ( variable , hook_fn , * args ) : return printing . Print ( global_fn = ( lambda _ , x : hook_fn ( x , * args ) ) ) ( variable )
put a hook on a theano variables .