Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Will there be a problem to load pretrained imagenet model? #54

Open
wanginwang opened this issue May 16, 2020 · 0 comments
Open

Will there be a problem to load pretrained imagenet model? #54

wanginwang opened this issue May 16, 2020 · 0 comments

Comments

@wanginwang
Copy link

wanginwang commented May 16, 2020

It seems that in all your models such as dch.py, dhn.py, you first load model and pretrained model weights and then run global initializer,

self.img_last_layer, self.deep_param_img, self.train_layers, self.train_last_layer = self.load_model()

self.global_step = tf.Variable(0, trainable=False)
self.train_op = self.apply_loss_function(self.global_step)
self.sess.run(tf.global_variables_initializer())
return

We know that sess.run(tf.global_variables_initializer()) will initialize all trainable variables, so the model weights you load before are randomly initialized again if I understand correctly, right?
Looking forward to your reply!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant