版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wxf2012301351/article/details/84029110
import tensorflow as tf
with tf.variable_scope("foo", reuse=tf.AUTO_REUSE):
user_emb_w = tf.get_variable("user_emb_w", [2, 5])
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
print(sess.run(user_emb_w))