<jupyter_start><jupyter_text><jupyter_code>%tensorflow_version 1.x
import tensorflow as tf
print(tensorflow.__version__)<jupyter_output>1.15.2<jupyter_text>What is Tensor?    Tensor is a multi-dimensional array with a uniform data typechecks whats data types    tf.dtypes.DType<jupyter_code>a = tf.constant("meraz")
print(type(a))
print(a)
print(a.get_shape())
b = tf.constant([1.0, 2.0, 3.0, 4.0])
print(a.get_shape())
with tf.Session() as sess:
    out = sess.run(a)
    print(out)<jupyter_output>b'meraz'<jupyter_text>Baics Maths in TF<jupyter_code>a = tf.constant(5)
b = tf.constant(5)
c = a+b
print(c)
with tf.Session() as sess:
    out = sess.run(c)
    print(out)
c = tf.constant([[4.0, 5.0], [10.0, 1.0]])

# Find the largest value
max_val = tf.reduce_max(c)
# Find the index of the largest value
max_val_index = tf.argmax(c)
with tf.Session() as sess: print(sess.run(max_val))
with tf.Session() as sess: print(sess.run(max_val_index))<jupyter_output>[1 0]<jupyter_text>Linear Algebra<jupyter_code>random_array = tf.random_normal((2, 3))
with tf.Session() as sess: print(sess.run(random_array))
identity_ar = tf.ones((3, 4))
with tf.Session() as sess: print(sess.run(identity_ar))
zeros_ar = tf.ones((3, 4))
with tf.Session() as sess: print(sess.run(zeros_ar))
fill_mat = tf.fill((3, 3), 5)
identity_ar = tf.ones((3, 4))
with tf.Session() as sess: print(sess.run(fill_mat))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16087880935506732, 'fraction_numerical': 0.026222537207654145, 'mean_word_length': 5.788461538461538, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '57276', 'license': 'MIT', 'n_tokens_mistral': 607, 'n_tokens_neox': 577, 'n_words': 123, 'path': 'Mod_01/mod_01_basic.ipynb', 'repo_name': 'merazlab/tensorflow', 'size': '1411'}