When using a tensor panel, how to sum the loss, which is calculated by several minibars?

I would like to use Tensorboard to visualize the evolution of loss over sample validation. But the set of checks is too large to be calculated in one mini-tea. Therefore, in order to calculate my loss of verification, I have to call session.run several times over several mini-elements spanning the verification set. Then I summarize the loss (in python) of each mini-paragraph to get the full loss of check.

My problem is that tf.scalar_summary seems to need to bind to the tensor stream node. But I need to somehow “attach” it to the sum of the values ​​of a node over several sessions.run sessions.

Is there any way to do this? Maybe by direct summation of a pyat float that contains the sum of losses on the chip? But I did not see in the documents a way to “sum” a tensor table for a tensor table that is python that is outside the scope of the calculation. The example in the How-To section of the document only depends on the losses that can be calculated in one session.run session.

+4
source share
1 answer

You can add Variable, which is updated with every call sess.Run, and the total track value Variable.

+5
source

Source: https://habr.com/ru/post/1620054/


All Articles