I have a deep network of fully connected layers created using slim. I would like to do training of the network gradually - first allowing the first layer to be optimized, then the second and so forth. Reading, I see that this might be done using tf.stop_gradient, although how one does this is not clear. Perhaps a better way is to use the trainable flag in the slim call - just set all but the first layer to be false. Unfortunately, this would require gradually setting subsequent layers to true as the training progresses, changing the graph. Not sure if this is legal.
My questions: - are these reasonable approaches for what I want to do? - can anyone suggests how to implement either approach?