def gpu_mem_free():
 global cuda
 if (cuda is None):
  from theano.sandbox import cuda
 return ((cuda.mem_info()[0] / 1024.0) / 1024)

def gpu_mem_free ( ) : global cuda if ( cuda is None ) : from theano . sandbox import cuda return ( ( cuda . mem_info ( ) [ 0 ] / 1024.0 ) / 1024 )
memory free on the gpu returns megs_free : float number of megabytes of memory free on the gpu used by theano .