Transfer Learning - Option_1

For the first option, we want to train the neural network in such a manner that only the weights of the output layer get updated. Do we use any other algorithm to do so? because the usual back propagation algorithm updates all the weights across all the layers.

TensorFlow allows the weights in a layer to be locked during training, so that you can update the weights only in specific layers.