您当前的位置: 首页 > 
  • 0浏览

    0关注

    2393博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

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

一个处女座的程序猿 发布时间:2018-10-04 21:50:05 ,浏览量:0

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 /

## 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中监控训练情况

 

 

 

 

关注
打赏
1664196048
查看更多评论
立即登录/注册

微信扫码登录

0.0436s