Theano Function should have a function to free intermediate memory