python - 训练最后一层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_scopes
或checkpoint_exclude_scopes
重新训练这个模型的最后一层。
有人可以告诉我那些是什么。
解决方案
推荐阅读
- html - 分页符在 HTML 中对我不起作用
- botframework - 将状态信息从助手传递到技能的最佳方式
- mysql - 为什么 Laravel 5.8 迁移在不更改表名的情况下不起作用?
- ruby - 如何从ruby中的多行字符串中获取第n行到最后一行的数据?
- python - 将总分钟数中的小时和分钟分配给元组;寻找简洁的方法来缩短代码而不使用 datetime 模块
- r - 带约束的最小二乘
- reactjs - 带有可加载组件的服务器端渲染不起作用
- flutter - 不推荐使用祖先StateOfType,而是使用 findAncestorStateOfType
- spring-boot - Spring LDAP 安全性 - BeanCreationException
- r - 在 Rmarkdown 中编织到 pdf 时,代码离开页面