I'm going to finetune some of the image models from the pre-trained models provided in: https://github.com/tensorflow/models/tree/master/research/slim
Here is the template of the finetune script:
$ DATASET_DIR=/tmp/flowers
$ TRAIN_DIR=/tmp/flowers-models/inception_v3
$ CHECKPOINT_PATH=/tmp/my_checkpoints/inception_v3.ckpt
$ python train_image_classifier.py \
--train_dir=${TRAIN_DIR} \
--dataset_dir=${DATASET_DIR} \
--dataset_name=flowers \
--dataset_split_name=train \
--model_name=inception_v3 \
--checkpoint_path=${CHECKPOINT_PATH} \
# Please notice the 2 lines below
--checkpoint_exclude_scopes=InceptionV3/Logits,InceptionV3/AuxLogits \
--trainable_scopes=InceptionV3/Logits,InceptionV3/AuxLogits
The last 2 lines are the layers that we want to finetune, the above example is only for Inception model.
I wonder that how can we know the exact name of this layer like InceptionV3/Logits
? And if I do finetune for ResNet, which name should I type in the template? Is there a formal way to get the graph of the net, in order to know all of the layer names?