February 18, 2019

 import tensorflow as tf

features = tf.constant([[[1, 2], [3, 4]]], dtype=tf.float32)  # [1, 2, 2]

fc = tf.contrib.layers.fully_connected(features, num_outputs=5)
se = tf.Session()
se.run(tf.global_variables_initializer())
print(se.run(fc))
print(fc.shape)

 



Contributed by Shark

Leave a Reply

Your email address will not be published. Required fields are marked *