Reputation: 95
I attempted to freeze some of the variables by only passing the variables that I would like to fine-tune on via the
tf.train.AdamOptimizer.compute_gradients(var_list=[])
approach.
But when I proceeded with fine-tuning my model, the loss is going up and the accuracy is going down so I am having doubt that I have successfully frozen the initial few layers.
Any way to check if I'm freezing variables properly? Thanks!
Upvotes: 2
Views: 341
Reputation: 721
Try tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES)
.
Upvotes: 1