title: how to log validation loss and accuracy using tfslim
body: <p>Is there any way that I can log the validaton loss and accuracy to tensorboard when using tf-slim? When I was using keras, the following code can do this for me:</p>
  
  <pre><code>model.fit_generator(generator=train_gen(), validation_data=valid_gen(),...)
  </code></pre>
  
  <p>Then the model will evaluate the validation loss and accuracy after each epoch, which is very convenient. But how to achieve this using tf-slim? The following steps are using primitive tensorflow, which is not what I want:</p>
  
  <pre><code>with tf.Session() as sess:
      for step in range(100000):
          sess.run(train_op, feed_dict={X: X_train, y: y_train})
          if n % batch_size * batches_per_epoch == 0:
              print(sess.run(train_op, feed_dict={X: X_train, y: y_train}))
  </code></pre>
  
  <p>Right now, the steps to train a model using tf-slim is:</p>
  
  <pre><code>tf.contrib.slim.learning.train(
      train_op=train_op,
      logdir="logs",
      number_of_steps=10000,
      log_every_n_steps = 10,
      save_summaries_secs=1
  )
  </code></pre>
  
  <p>So how to evaluate validation loss and accuracy after each epoch with the above slim training procedure?</p>
  
  <p>Thanks in advance!</p>