should not only restore trainable variables in `get_embd.py`?
HongtaoYang opened this issue · 1 comments
HongtaoYang commented
I noticed that you only restore trainable variables in get_embd.py
, I guess that is an typo and is not intended?
with tf.Session(config=tf_config) as sess:
tf.global_variables_initializer().run()
print('loading...')
saver = tf.train.Saver(var_list=tf.trainable_variables())
saver.restore(sess, args.model_path)
print('done!')
Restoring only trainable variables will results in very bad performance because some BN weights and maybe some pretrained (frozen) weights are not restored.
kscp123 commented
Yes, it will get wrong embedding. I use this way can get right result.
saver = tf.train.Saver()
saver.restore(sess, args.model_path)