Ones
title: "Ones"
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'
<tf.Tensor 'ones:0' shape=(2, 5) dtype=float32>
Read More
Placeholders
title: "Add Method"
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'
# Initialize global variables
init_op = tf.global_variables_initializer()
session = tf.Session()
session.run(init_op)
a = tf.placeholder(tf.float32 …
Read More
Print In Tensorflow
title: "Print in Tensorflow"
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([[1, 2, 3]])
init = (tf.global_variables_initializer(), tf.local_variables_initializer())
Read More
Print Tensorflow
title: "Print in Tensorflow"
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'
sess = tf.InteractiveSession()
<tensorflow.python.client.session.InteractiveSession at 0x12b796668>
Read More
Print Values
title: "Print Values"
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'
normal_rv = tf.Variable(tf.truncated_normal([2, 3], stddev=0.1))
# Initialize the variables
init_op = tf.initialize_all_variables()
Read More
Reshape
title: "Reshape"
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'
tf.InteractiveSession()
a = tf.zeros((2, 2))
b = tf.ones((2, 2))
abc = tf.reduce_sum(b, reduction_indices=1 …
Read More
Reshape-1
title: "Reshape 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, 5, 6, 7, 9])
b = tf.reshape(a, [2, 4 …
Read More
Session-2
title: "Session 2"
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'
Read More
Session-And-With-Block
title: "Session and With Block"
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'
<tf.Tensor 'mul:0' shape=() dtype=int32 …
Read More
Simple-Calculation-Graph
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'
const = tf.constant(2.0, name='const')
# create variables
b = tf.Variable(2 …
Read More