Training only some layers

Another important part of transfer learning is freezing the weights of the layers that you don't want to train, while allowing some layers (typically the final ones) to be trained. In TensorFlow, we can pass to our solver only the layers that we want to optimize (in this example, only the FC layers):

train_step = tf.train.AdamOptimizer(learning_rate).minimize(loss, var_list=list_fc_linear) 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.146.176.88