CV之NS之VGG16:基于预训练模型VGG16训练COCO的train2014数据集实现训练《神奈川冲浪里》风格配置yml文件

246 篇文章 236 订阅

CV之NS之VGG16:基于预训练模型VGG16训练COCO的train2014数据集实现训练《神奈川冲浪里》风格配置yml文件

 

 

目录

一、训练

1、《神奈川冲浪里》风格

2、配置yml文件

二、TensorBoard中监控训练情况


 

 

 

一、训练

1、《神奈川冲浪里》风格

风格如图

2、配置yml文件

 

style_image: img/wave.jpg # targeted style image指定原始风格图像
##naming、model_path 两个量定义了最终的checkpoint 和监控信息。events文件会被保存在models/wave文件夹下
naming: "wave" # the name of this model一般和图像名字保持一致. Determine the path to save checkpoint and events file.
model_path: models  # root path根目录 to save checkpoint and events file. The final path would be <model_path>/<naming>

## Weight of the loss各个损失的权重
content_weight: 1.0  # weight for content features loss内容损失权重
style_weight: 220.0  # weight for style features loss风格损失权重
tv_weight: 0.0  # weight for total variation loss,(1)在本项目中,发现设定它的权重为0也不影响收敛

## The size, the iter number to run 训练原始图片大小、一次batch的样本数、跑的epoch运行次数
image_size: 256  
batch_size: 4
epoch: 2

## Loss Network损失网络
loss_model: "vgg_16"
content_layers:  # use these layers for content loss使用conv3_3定义内容损失
  - "vgg_16/conv3/conv3_3"
style_layers:  # use these layers for style loss使用conv1_2、conv2_2、conv3_3、conv4_3定义风格损失
  - "vgg_16/conv1/conv1_2"
  - "vgg_16/conv2/conv2_2"
  - "vgg_16/conv3/conv3_3"
  - "vgg_16/conv4/conv4_3"
checkpoint_exclude_scopes: "vgg_16/fc"  # we only use the convolution layers, so ignore fc layers.只用到卷积层所以不需要fc层
loss_model_file: "pretrained/vgg_16.ckpt"  # the path to the checkpoint预训练模型对应的位置

 

二、TensorBoard中监控训练情况

 

 

 

 

  • 5
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

一个处女座的程序猿

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值