tf.get_variable()使用

版权声明:本文为博主原创文章,未经博主允许不得转载。 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))

猜你喜欢

转载自blog.csdn.net/wxf2012301351/article/details/84029110
今日推荐