Home > AI > Uncategorized

tf.contrib.layers.fully_connected

 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)

 

Related posts:

Leave a Reply