摘要:
graph即tf.Graph(),session即tf.Session(),很多人经常将两者混淆,其实二者完全不是同一个东西。 graph定义了计算方式,是一些加减乘除等运算的组合,类似于一个函数。它本身不会进行任何计算,也不保存任何中间计算结果。 session用来运行一个graph,或者运行gr 阅读全文
摘要:
tf.nn.embedding_lookup(params, ids, partition_strategy='mod', name=None, validate_indices=True, max_norm=None) 首先通过一下一个简单的例子来了解一下tf.nn.embedding_lookup()的用法 a = tf.constant([[1,2,3],[4,5,6],[7,8,9],[... 阅读全文