<jupyter_start><jupyter_text>Summaries and TensorBoard  tf.contrib.summary eager mode와 graph 호환<jupyter_code>'''
writer = tf.contrib.summary.crteate_file_writer("./logdir/")
global_step = tf.train.get_or_create_blobal_step() # 전역 스텝 변수를 반환
writer.set_as_default()

for _ in range(iterations):
  global_step.assign_add(1)
  # record_summaries 함수를 포함시켜야 합니다.
  with tf.contrib.summary.record_summaries_every_n_global_steps(100):
    # 사용자 모델의 코드는 여기 배치됩니다.
    tf.contrib.summary.scalar('loss', loss)
     ...
'''<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12014787430683918, 'fraction_numerical': 0.0073937153419593345, 'mean_word_length': 5.3023255813953485, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '94356', 'license': 'Apache-2.0', 'n_tokens_mistral': 243, 'n_tokens_neox': 266, 'n_words': 35, 'path': 'eager_excution/09.Summaries and TensorBoard.ipynb', 'repo_name': 'jaeho-kang/modu-tensorflow-v2', 'size': '541'}