InsightFace-tensorflow icon indicating copy to clipboard operation
InsightFace-tensorflow copied to clipboard

should not only restore trainable variables in `get_embd.py`?

Open HongtaoYang opened this issue 5 years ago • 1 comments

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.

HongtaoYang avatar Sep 13 '19 02:09 HongtaoYang

Yes, it will get wrong embedding. I use this way can get right result. saver = tf.train.Saver() saver.restore(sess, args.model_path)

kscp123 avatar Oct 09 '19 09:10 kscp123