Print In Tensorflow
Sat 17 May 2025
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())
sess = tf.Session()
sess.run(init)
(None, None)
sess.run(a)
array([[1, 2, 3]], dtype=int32)
Score: 5
Category: tensorflow-work