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>
c = a * b
# Lauch session
sess = tf.Session()
# Evaluate the tensor c
print(sess.run(c))
15.0
Score: 10
Category: tensorflow-work