I\'m trying to find out why the code below occurs a huge memory leak during iteration by iteration. Here\'s the whole code.
def train_network(file_folder, fi
The reason is you create new tensorflow operations on every session call.
Move these two out of for loop tf.gather(class_logit, 0), tf.gather(highlight_logit, 0), and problem should gone.
tf.gather(class_logit, 0), tf.gather(highlight_logit, 0)