I am using a Tensorflow tf.Saver
to load a pre-trained model and I want to re-train a few of its layers by erasing (re-initializing to random) their appropriate weights and biases, then training those layers and saving the trained model. I can not find a method that re-initializes the variables. I tried tf.initialize_variables(fine_tune_vars)
but it did not work (I'd assume because the variables are already initialized), I have also seen that you can pass variables to the tf.Saver
so that you partially load the model, however that is half of what I want to achieve (because when I save the trained model, I want it to save all variables not only the ones I loaded).
Thank you in advance!