TensorFlow: understanding the `collections` argument in tf.summary.scalar

I work with TensorBoard in particular tf.summary.scalar. In the documentation, it has a press formula collections=None, which is described as:

collections: optional list of graph set keys. A new op collection is being added to these collections. By default [GraphKeys.SUMMARIES].

I do not understand this description and what it is used for collections. Can someone please explain this to me, and maybe give me a good use case?

+4
source share
1 answer

! , node, .

tf.summary.scalar('learning_rate', p_lr, collections=['train'])
tf.summary.scalar('loss', t_loss, collections=['train', 'test'])

, . :

s_training = tf.summary.merge_all('train')
s_test = tf.summary.merge_all('test')

, ; p_lr ( ) , , - , .

() , , node Supervisor. , (, sv.summary_computed() Supervisor), .

+8

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


All Articles