腾讯云网站免费建设,廊坊网络公司网站,北京到安阳的火车票,博物馆装修厂家风格迁移大作业 学习规划 跑通一份代码#xff01;#xff01;#xff01;#xff08;done#xff09;对照代码、Blog和论文理解相应的算法过程规划下一步#xff0c;修改代码#xff08;done#xff09;#xff0c;实现预计功能#xff08;done#xff09;调参done对照代码、Blog和论文理解相应的算法过程规划下一步修改代码done实现预计功能done调参跑出较好Problem Queue 算法和代码对应细化尽量搞吧。。。PPT/报告里讲啥?代码修改损失函权重参数、多张图片风格渐变效果损失函数形式本代码的生成图片的初始值是内容图片可以改成普通的白噪声/突出重点的黑白轮廓图/抠图。实际上将初始值设定为内容图像就是以这个作为迭代的起点一定程度上掩盖了迭代次数少的问题。融合2个以上的风格跑个比较优美的风格过度效果掩盖一下垃圾的图片效果。可以参考https://zhuanlan.zhihu.com/p/27512619 展示图片效果。。只包含风格的图像只包含内容的图像玄学感受风格图片元素单一不要过于复杂最好不要有明显的主角或者关键点火内容图像相反需要有明显的”主角“和重点大头贴、肖像初始化图片需要对内容图片做一些处理得到。。比如强调主角模糊甚至抹去背景颜色重怎样挑数据参考网上一些以有的比较好的效果图片查找类似的图片对照测试需要跑出比较好的结果把 GPU 版还是配好吧。。。 迭代次数增加10-20倍从十几个小时编程几十分钟。。。次数不够跑不出好效果吧。。。是可以分组跑的用上一次迭代的结果作为这一次迭代的初始值。跑通一份代码 尝试配置 win 下pycharm tensorflow (done) anaconda 大法好 Note参考https://blog.csdn.net/gongxsh00/article/details/81318404python 版本与 anaconda 对应尽量最新激活虚拟环境退出虚拟环境 activate tensorflow deactivate tansorflow 、pip 都更新到最新 pip install --upgrade pip pip 链接超时可以在使用pip的时候加参数-i https://pypi.tuna.tsinghua.edu.cn/simple无权限更新就开管理员大部分问题都是因为版本不对应注意目录对应的 python 以及 python/scripts 要加入环境变量多加没坏处。pycharm 版本改成最新的 (pycharm 有些奇怪的坑尽量用 anacondapip .ReadTimeoutError: HTTPSConnectionPool(hostfiles.pythonhosted.org, port443): Read timed out. 使用pip install *** --default-timeout1000找一份代码、运行成功 (done)https://www.cnblogs.com/andrewwang/p/10836929.htmlhttps://blog.csdn.net/dcrmg/article/details/81269653https://blog.csdn.net/u010900574/article/details/53427544https://github.com/keras-team/keras学会远程使用服务器调用老师提供的显卡计算配置环境 tensorflow 运行样例代码(done)对照代码、Blog和论文理解相应的算法过程 规划下一步流程修改代码实现预计功能 修改样例代码实现加入2个风格(done) Modify1parser.add_argument(style_reference_image_path_1, metavarref, typestr,helpPath to the style reference image_1.)
parser.add_argument(style_reference_image_path_2, metavarref, typestr,helpPath to the style reference image_2.) Modify2style_reference_image_path_1 args.style_reference_image_path_1
style_reference_image_path_2 args.style_reference_image_path_2 Modify3style_reference_image_1 K.variable(preprocess_image(style_reference_image_path_1))
style_reference_image_2 K.variable(preprocess_image(style_reference_image_path_2)) Modify4 后边需要注意每个量的位置input_tensor K.concatenate([base_image,style_reference_image_1,style_reference_image_2,combination_image], axis0) Modify5 combination_features由于4操作这里需要注意维数的变化combination_features layer_features[3, :, :, :] Modify6 修改损失函数(待修改)for layer_name in feature_layers:layer_features outputs_dict[layer_name]style_reference_features_1 layer_features[1, :, :, :]combination_features layer_features[3, :, :, :]sl style_loss(style_reference_features_1, combination_features)loss (style_weight / len(feature_layers)) * slstyle_reference_features_2 layer_features[2, :, :, :]combination_features layer_features[3, :, :, :]sl style_loss(style_reference_features_2, combination_features)loss (style_weight / len(feature_layers)) * sl Note 主要代码可以根据 keras中文文档 了解含义甚至并不用深入理解代码。。。跟着感觉把代码改了一下。。。莫名其妙代码一遍改好。。。跑一下就把结果跑出来了。。。转载于:https://www.cnblogs.com/RRRR-wys/p/11010491.html