Simple-Multiplication

Sat 17 May 2025

title: "Simple Multiplication" author: "Raja CSP Raman" date: 2019-05-09 description: "-" type: technical_note draft: false


import tensorflow as tf

import os

# Just disables the warning, doesn't enable AVX/FMA
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
a = tf.random_normal([2, 2])
b = tf.random_normal([2, 2])
a
<tf.Tensor 'random_normal_3:0' shape=(2 …

Category: tensorflow-work

Read More

Simple-Session

Sat 17 May 2025

title: "Simple Session" author: "Raja CSP Raman" date: 2019-05-07 description: "-" type: technical_note draft: false


import tensorflow as tf

import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
hello = tf.constant('Hello, TensorFlow!')
hello
<tf.Tensor 'Const:0' shape=() dtype=string>
sess = tf.Session()
sess.run(hello)
b'Hello, TensorFlow!'
a = tf.constant(20 …

Category: tensorflow-work

Read More

Simple-Tensorflow

Sat 17 May 2025

title: "Simple Tensorflow" author: "Raja CSP Raman" date: 2019-05-07 description: "-" type: technical_note draft: false


import tensorflow as tf

import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
a = tf.constant(5.0)
a
<tf.Tensor 'Const:0' shape=() dtype=float32>
b = tf.constant(3.0)
b
<tf.Tensor 'Const_1:0' shape=() dtype=float32 …

Category: tensorflow-work

Read More

Stack

Sat 17 May 2025

author: "Raja CSP Raman" date: 2019-05-07 description: "-" type: technical_note draft: false


import tensorflow as tf

import os

# Just disables the warning, doesn't enable AVX/FMA
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
a = tf.constant([1, 2])
b = tf.constant([3, 4])
c = tf.constant([10, 20])
a
<tf.Tensor 'Const_12:0 …

Category: tensorflow-work

Read More

Stack-Extra

Sat 17 May 2025

title: "Stack Extra" author: "Raja CSP Raman" date: 2019-05-07 description: "-" type: technical_note draft: false


import tensorflow as tf

import os

# Just disables the warning, doesn't enable AVX/FMA
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
a = tf.constant([
    [1, 2],
    [3, 4]
])
a
<tf.Tensor 'Const_4:0' shape=(2, 2) dtype=int32 …

Category: tensorflow-work

Read More

Template-Copy1

Sat 17 May 2025

title: "Template" author: "Raja CSP Raman" date: 2019-05-07 description: "-" type: technical_note draft: false


import tensorflow as tf

import os

# Just disables the warning, doesn't enable AVX/FMA
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'


Score: 0

Category: tensorflow-work

Read More

Updating Variable State

Sat 17 May 2025

title: "Updating Variable State" author: "Raja CSP Raman" date: 2019-05-07 description: "-" type: technical_note draft: false


import tensorflow as tf

import os

# Just disables the warning, doesn't enable AVX/FMA
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
a = tf.Variable(0, name = 'counter')

b = tf.add(a, tf.constant(2))

# update a with …

Category: tensorflow-work

Read More

Variables-And-Session

Sat 17 May 2025

title: "Variables and Session" author: "Raja CSP Raman" date: 2019-05-07 description: "-" type: technical_note draft: false


import tensorflow as tf

import os

# Just disables the warning, doesn't enable AVX/FMA
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
a = tf.ones((2, 2))
b = tf.Variable(tf.zeros((2, 2)), name = 'weights')

with tf …

Category: tensorflow-work

Read More

Variables-With-Random-Values

Sat 17 May 2025

title: "Variables With Random Values" author: "Raja CSP Raman" date: 2019-05-06 description: "-" type: technical_note draft: false


import tensorflow as tf

import os

# Just disables the warning, doesn't enable AVX/FMA
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
a = tf.random_uniform((4, 4), 0, 1)
a
<tf.Tensor 'random_uniform_2:0' shape=(4, 4 …

Category: tensorflow-work

Read More

Variables-With-Type

Sat 17 May 2025

title: "Variables with Type" author: "Raja CSP Raman" date: 2019-05-06 description: "-" type: technical_note draft: false


import tensorflow as tf

import os

# Just disables the warning, doesn't enable AVX/FMA
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
w = tf.Variable([.2], dtype=tf.float32)
b = tf.Variable([0.11], dtype=tf.float32)
x …

Category: tensorflow-work

Read More
Page 3 of 3

« Prev