for i in range(3):
    g = tf.Graph()
with g.as_default():
    tf.set_random_seed(1)
accuracy_result, average_error = network.train_network(parameters,
    inputHeight, inputWidth, inputChannels, outputClasses)
How to get stable results with TensorFlow, setting random seed