mardi 2 mai 2017

Multiple executions of the evaluation gives different losses in TensorFlow

I'm getting started with TensorFlow. http://ift.tt/2hUWjxq

While I was evaluating multiple times seeing how to feed the data, I found that the loss changes with executions.

eval_input_fn = tf.contrib.learn.io.numpy_input_fn({"x":x}, y, batch_size=4,
                                          num_epochs=1)
estimator.evaluate(input_fn = eval_input_fn)

For example, I had losses following:

0.024675447 or 0.030844312 when batch_size == 2, num_epochs == 2

0.020562874 or 0.030844312 when batch_size == 4, num_epochs == 2

0.015422156 or 0.030844312 when batch_size == 4, num_epochs == 1

Is this phenomenon normal? I do not understand the principle behind it.

Aucun commentaire:

Enregistrer un commentaire