<jupyter_start><jupyter_text>[View in Colaboratory](https://colab.research.google.com/github/findingfoot/ML_practice-codes/blob/master/Operations_with_tensorboard_graph.ipynb)<jupyter_code>import os
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt

from tensorflow.python.framework import ops
ops.reset_default_graph()
import warnings
warnings.filterwarnings('ignore')

sess= tf.Session()
x_vals = np.array([1.,5.,7.,2.,9.])

x_data = tf.placeholder(tf.float32)

const = tf.constant(4.)
#multiply
prod = tf.multiply(x_data, const)
for num in x_vals:
    print(sess.run(prod, feed_dict={x_data: num}))
# create a tensorboard
merged = tf.summary.merge_all(key='summaries')

if not os.path.exists('tensorboard_logs/'):
    os.makedirs('tensorboard_logs/')
    
writer = tf.summary.FileWriter('tensorboard_logs', sess.graph)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13356164383561644, 'fraction_numerical': 0.0091324200913242, 'mean_word_length': 6.24793388429752, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, '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': '354833', 'license': 'MIT', 'n_tokens_mistral': 320, 'n_tokens_neox': 311, 'n_words': 55, 'path': 'Operations_with_tensorboard_graph.ipynb', 'repo_name': 'pk1412/ML_practice-codes', 'size': '876'}