text: Title: TFLearn Memory Leak
  Body: I'm running the following Flask application to train a DNN similar to AlexNet on some images. After each run I delete everything Python has available to me in memory. However, each run adds about 1GB of memory to the running Python process and produces an OOM exception sooner or later. Below is the entire application, each call to /build runs the model 30 times are random data. This is a proof of concept for a model which has far too much data to read into memory so I'm sampling the data over iterations like this. I know I can use the Image Preloader, but because I have so much data I'm actually loading pickle files in each iteration and not image files at the moment. Either way, some memory continues to be allocated over each iteration of this application which I cannot deallocate. 
  
  ```
  `import tflearn
  from flask import Flask, jsonify
  from tflearn.layers.core import input_data, dropout, fully_connected
  from tflearn.layers.conv import conv_2d, max_pool_2d
  from tflearn.layers.normalization import local_response_normalization
  from tflearn.layers.estimator import regression
  
  import numpy as np
  
  app = Flask(__name__)
  
  keep_prob = .8
  num_labels = 3
  batch_size = 64
  
  
  def reformat(dataset, labels, num_labels):
      if dataset is not None:
          dataset = dataset.reshape((-1, 227, 227, num_labels)).astype(np.float32)
      if labels is not None:
          labels = (np.arange(3) == labels[:, None]).astype(np.float32)
      return dataset, labels
  
  class AlexNet():
  
      def __init__(self):
  
          @app.route('/build')
          def build():
  
              # Building 'AlexNet'
              network = input_data(shape=[None, 227, 227, 3])
              network = conv_2d(network, 96, 11, strides=4, activation='relu')
              network = max_pool_2d(network, 3, strides=2)
              network = local_response_normalization(network)
              network = conv_2d(network, 256, 5, activation='relu')
              network = max_pool_2d(network, 3, strides=2)
              network = local_response_normalization(network)
              network = conv_2d(network, 384, 3, activation='relu')
              network = conv_2d(network, 384, 3, activation='relu')
              network = conv_2d(network, 256, 3, activation='relu')
              network = max_pool_2d(network, 3, strides=2)
              network = local_response_normalization(network)
              network = fully_connected(network, 4096, activation='tanh')
              network = dropout(network, keep_prob)
              network = fully_connected(network, 4096, activation='tanh')
              network = dropout(network, keep_prob)
              network = fully_connected(network, num_labels, activation='softmax')
              network = regression(network, optimizer="adam",
                                   loss='categorical_crossentropy',
                                   learning_rate=0.001, batch_size=batch_size)
  
              model = tflearn.DNN(network, tensorboard_dir="./tflearn_logs/",
                                  checkpoint_path=None, tensorboard_verbose=0)
  
  
              for i in range(30):
                  data = np.random.randn(10, 227, 227, 3)
                  labels = np.random.choice([0, 2], size=(10,), p=[1. / 3, 2. / 3])
  
                  data, labels = reformat(data, labels, 3)
  
                  model.fit(data, labels, n_epoch=1, shuffle=True,
                            validation_set=None,
                            show_metric=True, batch_size=batch_size, snapshot_step=None,
                            snapshot_epoch=True, run_id=None)
  
              del data
              del labels
              del model
              del network
              return jsonify(status=200)
  
  
  if __name__ == "__main__":
      AlexNet()
      app.run(host='0.0.0.0', port=5000, threaded=True)`
  ```
  