def train_nn(sess, epochs, batch_size, get_batches_fn, train_op, cross_entropy_loss, input_image, correct_label, keep_prob, learning_rate):
    '\n    Train neural network and print out the loss during training.\n    :param sess: TF Session\n    :param epochs: Number of epochs\n    :param batch_size: Batch size\n    :param get_batches_fn: Function to get batches of training data.  Call using get_batches_fn(batch_size)\n    :param train_op: TF Operation to train the neural network\n    :param cross_entropy_loss: TF Tensor for the amount of loss\n    :param input_image: TF Placeholder for input images\n    :param correct_label: TF Placeholder for label images\n    :param keep_prob: TF Placeholder for dropout keep probability\n    :param learning_rate: TF Placeholder for learning rate\n    '
    sess.run(tf.global_variables_initializer())
    for epoch in range(epochs):
        for (input_img, gt_img) in get_batches_fn(batch_size):
            (_, loss) = sess.run([train_op, cross_entropy_loss], feed_dict={input_image: input_img, correct_label: gt_img, keep_prob: 0.7, learning_rate: 0.0005})
        print('Loss of {} at epoch {}/{}'.format(loss, epoch, epochs))
Train neural network and print out the loss during training.
:param sess: TF Session
:param epochs: Number of epochs
:param batch_size: Batch size
:param get_batches_fn: Function to get batches of training data.  Call using get_batches_fn(batch_size)
:param train_op: TF Operation to train the neural network
:param cross_entropy_loss: TF Tensor for the amount of loss
:param input_image: TF Placeholder for input images
:param correct_label: TF Placeholder for label images
:param keep_prob: TF Placeholder for dropout keep probability
:param learning_rate: TF Placeholder for learning rate
def train_nn(sess, epochs, batch_size, get_batches_fn, train_op, cross_entropy_loss, input_image, correct_label, keep_prob, learning_rate):
    '\n    Train neural network and print out the loss during training.\n    :param sess: TF Session\n    :param epochs: Number of epochs\n    :param batch_size: Batch size\n    :param get_batches_fn: Function to get batches of training data.  Call using get_batches_fn(batch_size)\n    :param train_op: TF Operation to train the neural network\n    :param cross_entropy_loss: TF Tensor for the amount of loss\n    :param input_image: TF Placeholder for input images\n    :param correct_label: TF Placeholder for label images\n    :param keep_prob: TF Placeholder for dropout keep probability\n    :param learning_rate: TF Placeholder for learning rate\n    '
    sess.run(tf.global_variables_initializer())
    for epoch in range(epochs):
        for (input_img, gt_img) in get_batches_fn(batch_size):
            (_, loss) = sess.run([train_op, cross_entropy_loss], feed_dict={input_image: input_img, correct_label: gt_img, keep_prob: 0.7, learning_rate: 0.0005})
        print('Loss of {} at epoch {}/{}'.format(loss, epoch, epochs))