使用slim训练模型的参数介绍

# 对参数进行介绍
python train_image_classifier.py \
  # 表示在该目录下保存日志和checkpoint
  --train_dir=satellite/train_dir \
  # 制定训练的新的数据集
  --dataset_name=satellite \
  --dataset_split_name=train \
  # 训练数据集保存的位置
  --dataset_dir=satellite/data \
  # 使用的模型的名称
  --model_name=inception_v3 \
  # 预训练模型保存的位置
  --checkpoint_path=satellite/pretrained/inception_v3.ckpt \
  # 在恢复预训练模型的时候,不恢复这两层的数据
  --checkpoint_exclude_scopes=InceptionV3/Logits,InceptionV3/AuxLogits \
  # trainable_scopes规定了模型中微调变量的范围
  # 这里仅仅对Inception/Logits, Inception/AuxLogits两个变量进行微调,其他变量都保持不懂
  # Inception/AuxLogits相当于全连接层里的fc8,是Inception V3的“末断层”
  # 如果不对此参数进行训练,则会对模型中的所有参数进行训练
  --trainable_scopes=InceptionV3/Logits,InceptionV3/AuxLogits \
  # 最大的执行步骤
  --max_number_of_steps=100000 \
  # 每一步的batch数量
  --batch_size=32 \
  # 学习率
  --learning_rate=0.001 \
  # 学习率是否是自动下降的,此处使用固定的学习率
  --learning_rate_decay_type=fixed \
  # 每隔300秒,程序讲当前模型保存在train_dir之中
  --save_interval_secs=300 \
  # 每隔2秒,系统会将日志写入该目录中
  --save_summaries_secs=2 \
  # 每隔10步,系统会在屏幕上打出训练信息
  --log_every_n_steps=10 \
  # 表示选定的优化器
  --optimizer=rmsprop \
  # 选定的weight_decay值 即模型中的所有参数的二次正则化超参数
  --weight_decay=0.00004
```



eg:
python train_image_classifier.py \
  --train_dir=satellite/train_dir \
  --dataset_name=satellite \
  --dataset_split_name=train \
  --dataset_dir=satellite/data \
  --model_name=inception_v3 \
  --checkpoint_path=satellite/pretrained/inception_v3.ckpt \
  --checkpoint_exclude_scopes=InceptionV3/Logits,InceptionV3/AuxLogits \
  --trainable_scopes=InceptionV3/Logits,InceptionV3/AuxLogits \
  --max_number_of_steps=100000 \
  --batch_size=32 \
  --learning_rate=0.001 \
  --learning_rate_decay_type=fixed \
  --save_interval_secs=300 \
  --save_summaries_secs=2 \
  --log_every_n_steps=10 \
  --optimizer=rmsprop \
  --weight_decay=0.00004

♥,.*,.♥,.*,.♥,.*,.♥,.*♥,.*,.♥,.*,.♥,.*,.♥,.*,.♥,.*,.♥,.*,.♥,.*,.♥♥,.*,.♥,.*,.♥,.*,.♥,.*♥,.*,.♥,.*,.♥,.*,.♥,.*,.♥,.*,.♥,.*,.♥,.*,.♥

广告时间:

本宝宝开通了一个公众号,记录日常的深度学习和强化学习笔记。

希望大家可以共同进步,嘻嘻嘻!求关注,爱你呦!

发布了131 篇原创文章 · 获赞 128 · 访问量 21万+

猜你喜欢

转载自blog.csdn.net/Valieli/article/details/103958040
今日推荐