首页 > 解决方案 > 训练最后一层inception_v4时要训练哪些变量。(trainable_scopes/checkpoint_exclude_scopes)

问题描述

我使用以下命令重新训练inception_resnet_v2模型。

tcmd = "python train_image_classifier.py \
  --train_dir="+TRAIN_DIR+" \
  --dataset_name=training_images \
  --dataset_split_name=train \
  --dataset_dir="+DATASET_DIR+" \
  --model_name=inception_resnet_v2 \
  --checkpoint_path="+PRETRAINED_CHECKPOINT_DIR+"/inception_resnet_v2_2016_08_30.ckpt \
  --checkpoint_exclude_scopes=InceptionResnetV2/Logits,InceptionResnetV2/AuxLogits  \
  --trainable_scopes=InceptionResnetV2/Logits,InceptionResnetV2/AuxLogits  \
  --max_number_of_steps=1000 \
  --batch_size=16 \
  --learning_rate=0.01 \
  --learning_rate_decay_type=fixed \
  --save_interval_secs=60 \
  --save_summaries_secs=60 \
  --log_every_n_steps=100 \
  --weight_decay=0.00004"

os.system(tcmd)

现在我想更改命令来训练inception_v4. 我已经下载了这个模型的检查点,但我不知道什么是trainable_scopescheckpoint_exclude_scopes重新训练这个模型的最后一层。

有人可以告诉我那些是什么。

标签: pythondeep-learningclassificationtensorflow2.0pre-trained-model

解决方案


推荐阅读