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]
])
<tf.Tensor 'Const_4:0' shape=(2, 2) dtype=int32>
b = tf.constant([
[11, 12],
[13, 14]
])
<tf.Tensor 'Const_5:0' shape=(2, 2) dtype=int32>
c = tf.constant([
[21, 22],
[23, 24]
])
<tf.Tensor 'Const_6:0' shape=(2, 2) dtype=int32>
<tf.Tensor 'stack:0' shape=(3, 2, 2) dtype=int32>
with tf.Session() as sess:
d_val = sess.run(d)
print(d_val)
print(d)
[[[ 1 2]
[ 3 4]]
[[11 12]
[13 14]]
[[21 22]
[23 24]]]
Tensor("stack:0", shape=(3, 2, 2), dtype=int32)