<jupyter_start><jupyter_text>First Tensorflow Neurons<jupyter_code>import numpy as np
import tensorflow as tf
tf.set_random_seed(42)
import matplotlib.pyplot as plt
%matplotlib inline<jupyter_output><empty_output><jupyter_text>Set no.of of Input neurons<jupyter_code>n_input = 784
n_dense = 128

#Define placeholder tensor
x = tf.placeholder(tf.float32,[None,784])<jupyter_output><empty_output><jupyter_text>Define variable tensor<jupyter_code>b = tf.Variable(tf.zeros([n_dense]))
#w = tf.Variable(tf.random_normal([n_input,n_dense]))
w= tf.get_variable('w',[n_input,n_dense],initializer=tf.contrib.layers.xavier_initializer())<jupyter_output><empty_output><jupyter_text>Design computatinal graph<jupyter_code>z = tf.add(tf.matmul(x,w),b)
a = tf.nn.relu(z)<jupyter_output><empty_output><jupyter_text>Initalize Variables<jupyter_code>intializer_op = tf.global_variables_initializer()<jupyter_output><empty_output><jupyter_text>Execute Graph<jupyter_code>with tf.Session() as session:
    session.run(intializer_op)
    layer_output = session.run(a,feed_dict={x:np.random.random([1,n_input])})
layer_output
_ = plt.hist(np.transpose(layer_output))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1302127659574468, 'fraction_numerical': 0.011914893617021277, 'mean_word_length': 11.123711340206185, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '242832', 'license': 'MIT', 'n_tokens_mistral': 474, 'n_tokens_neox': 457, 'n_words': 52, 'path': 'TFLiveLessons/first tensorflow neurons.ipynb', 'repo_name': 'anilkumarpanda/deeplearning', 'size': '1175'}