luckycallor/InsightFace-tensorflow

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

HongtaoYang opened this issue · 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.

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