Tensorflow Memory Usage on Demand config = tf.ConfigProto() config.gpu_options.allow_growth=True sess = tf.Session(config=config)