reference:

GAN 讲解

https://blog.csdn.net/u010900574/article/details/53427544

命令行解析

https://blog.csdn.net/qq_24193303/article/details/80810892

命令行解析的坑

https://blog.csdn.net/qq_25964837/article/details/79077504

注意其内部参数

from __future__ import print_function
from keras.preprocessing.image import load_img, save_img, img_to_array
import numpy as np
from scipy.optimize import fmin_l_bfgs_b
import time
import argparse from keras.applications import vgg19
from keras import backend as K parser = argparse.ArgumentParser(description='Neural style transfer with Keras.')
parser.add_argument('base_image_path', metavar='base', type=str,
help='Path to the image to transform.')
parser.add_argument('style_reference_image_path', metavar='ref', type=str,
help='Path to the style reference image.')
parser.add_argument('result_prefix', metavar='res_prefix', type=str,
help='Prefix for the saved results.')
parser.add_argument('--iter', type=int, default=10, required=False,
help='Number of iterations to run.')
parser.add_argument('--content_weight', type=float, default=0.025, required=False,
help='Content weight.')
parser.add_argument('--style_weight', type=float, default=1.0, required=False,
help='Style weight.')
parser.add_argument('--tv_weight', type=float, default=1.0, required=False,
help='Total Variation weight.')
(base) C:\Users\lenovo>activate tf

(tf) C:\Users\lenovo>d
'd' 不是内部或外部命令,也不是可运行的程序
或批处理文件。 (tf) C:\Users\lenovo>d: (tf) D:\>D:\adevelop\keras\GAN\keras-master\examples
'D:\adevelop\keras\GAN\keras-master\examples' 不是内部或外部命令,也不是可运行的程序
或批处理文件。 (tf) D:\>cd D:\adevelop\keras\GAN\keras-master\examples (tf) D:\adevelop\keras\GAN\keras-master\examples>python neural_style_transfer.py "D:\\adevelop\\keras\\img\\tanm.jpg" "D:\\adevelop\\keras\\img\\vonga.jpg" "D:\\adevelop\\keras\\img\\tiananmen_fangao"
Using TensorFlow backend.
Downloading data from https://github.com/fchollet/deep-learning-models/releases/download/v0.1/vgg19_weights_tf_dim_ordering_tf_kernels_notop.h5
forrtl: error (): program aborting due to control-C event
Image PC Routine Line Source
libifcoremd.dll 00007FFBBCFB94C4 Unknown Unknown Unknown
KERNELBASE.dll 00007FFC07A656FD Unknown Unknown Unknown
KERNEL32.DLL 00007FFC089C3034 Unknown Unknown Unknown
ntdll.dll 00007FFC0AF93691 Unknown Unknown Unknown (tf) D:\adevelop\keras\GAN\keras-master\examples>python neural_style_transfer.py "D:\\adevelop\\keras\\img\\tanm.jpg" "D:\\adevelop\\keras\\img\\vonga.jpg" "D:\\adevelop\\keras\\img\\tiananmen_fangao"
Using TensorFlow backend.
Downloading data from https://github.com/fchollet/deep-learning-models/releases/download/v0.1/vgg19_weights_tf_dim_ordering_tf_kernels_notop.h5
/ [==============================] - 27s 0us/step
-- ::22.912925: I tensorflow/core/platform/cpu_feature_guard.cc:] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
-- ::23.111711: I tensorflow/core/common_runtime/gpu/gpu_device.cc:] Found device with properties:
name: GeForce GTX 6GB major: minor: memoryClockRate(GHz): 1.7845
pciBusID: ::00.0
totalMemory: .00GiB freeMemory: .97GiB
-- ::23.115455: I tensorflow/core/common_runtime/gpu/gpu_device.cc:] Adding visible gpu devices:
-- ::23.474086: I tensorflow/core/common_runtime/gpu/gpu_device.cc:] Device interconnect StreamExecutor with strength edge matrix:
-- ::23.476305: I tensorflow/core/common_runtime/gpu/gpu_device.cc:]
-- ::23.477352: I tensorflow/core/common_runtime/gpu/gpu_device.cc:] : N
-- ::23.479132: I tensorflow/core/common_runtime/gpu/gpu_device.cc:] Created TensorFlow device (/job:localhost/replica:/task:/device:GPU: with MB memory) -> physical GPU (device: , name: GeForce GTX 6GB, pci bus id: ::00.0, compute capability: 6.1)
Model loaded.
WARNING:tensorflow:Variable += will be deprecated. Use variable.assign_add if you want assignment to the variable value or 'x = x + y' if you want a new python Tensor object.
Start of iteration
Current loss value: 4708729000.0
Image saved as D:\\adevelop\\keras\\img\\tiananmen_fangao_at_iteration_0.png
Iteration completed in 12s
Start of iteration
Current loss value: 2911683000.0
Image saved as D:\\adevelop\\keras\\img\\tiananmen_fangao_at_iteration_1.png
Iteration completed in 9s
Start of iteration
Current loss value: 2555891200.0
Image saved as D:\\adevelop\\keras\\img\\tiananmen_fangao_at_iteration_2.png
Iteration completed in 9s
Start of iteration
Current loss value: 2370041300.0
Image saved as D:\\adevelop\\keras\\img\\tiananmen_fangao_at_iteration_3.png
Iteration completed in 9s
Start of iteration
Current loss value: 2268962800.0
Image saved as D:\\adevelop\\keras\\img\\tiananmen_fangao_at_iteration_4.png
Iteration completed in 9s
Start of iteration
Current loss value: 2198608600.0
Image saved as D:\\adevelop\\keras\\img\\tiananmen_fangao_at_iteration_5.png
Iteration completed in 9s
Start of iteration
Current loss value: 2155104300.0
Image saved as D:\\adevelop\\keras\\img\\tiananmen_fangao_at_iteration_6.png
Iteration completed in 9s
Start of iteration
Current loss value: 2122974200.0
Image saved as D:\\adevelop\\keras\\img\\tiananmen_fangao_at_iteration_7.png
Iteration completed in 9s
Start of iteration
Current loss value: 2096054800.0
Image saved as D:\\adevelop\\keras\\img\\tiananmen_fangao_at_iteration_8.png
Iteration completed in 9s
Start of iteration
Current loss value: 2074734200.0
Image saved as D:\\adevelop\\keras\\img\\tiananmen_fangao_at_iteration_9.png
Iteration completed in 9s (tf) D:\adevelop\keras\GAN\keras-master\examples>

keras04 GAN simple的更多相关文章

  1. (转) Read-through: Wasserstein GAN

    Sorta Insightful Reviews Projects Archive Research About  In a world where everyone has opinions, on ...

  2. [转]GAN论文集

    really-awesome-gan A list of papers and other resources on General Adversarial (Neural) Networks. Th ...

  3. GAN实战笔记——第六章渐进式增长生成对抗网络(PGGAN)

    渐进式增长生成对抗网络(PGGAN) 使用 TensorFlow和 TensorFlow Hub( TFHUB)构建渐进式增长生成对抗网络( Progressive GAN, PGGAN或 PROGA ...

  4. PHP设计模式(一)简单工厂模式 (Simple Factory For PHP)

    最近天气变化无常,身为程序猿的寡人!~终究难耐天气的挑战,病倒了,果然,程序猿还需多保养自己的身体,有句话这么说:一生只有两件事能报复你:不够努力的辜负和过度消耗身体的后患.话不多说,开始吧. 一.什 ...

  5. Design Patterns Simplified - Part 3 (Simple Factory)【设计模式简述--第三部分(简单工厂)】

    原文链接:http://www.c-sharpcorner.com/UploadFile/19b1bd/design-patterns-simplified-part3-factory/ Design ...

  6. WATERHAMMER: A COMPLEX PHENOMENON WITH A SIMPLE SOLUTION

    开启阅读模式 WATERHAMMER A COMPLEX PHENOMENON WITH A SIMPLE SOLUTION Waterhammer is an impact load that is ...

  7. BZOJ 3489: A simple rmq problem

    3489: A simple rmq problem Time Limit: 40 Sec  Memory Limit: 600 MBSubmit: 1594  Solved: 520[Submit] ...

  8. Le lié à la légèreté semblait être et donc plus simple

    Il est toutefois vraiment à partir www.runmasterfr.com/free-40-flyknit-2015-hommes-c-1_58_59.html de ...

  9. ZOJ 3686 A Simple Tree Problem

    A Simple Tree Problem Time Limit: 3 Seconds      Memory Limit: 65536 KB Given a rooted tree, each no ...

随机推荐

  1. java SE Development kit 8 Update 201 (64-bit) 的安装相关

    登录http://www.oracle.com,下载JDK(J2SE) JDK 1.0,1.1,1.2,1.3,1.4 1.5 (JDK5.0) à支持注解.支持泛型   1.6(JDK6.0) à ...

  2. DotNetCore跨平台~聊聊中间件

    回到目录 在进行.net core平台之后,我们如果希望在请求过程中添加一些事件是非常容易的,你可以把这些事件做成一个中间件Middleware,然后这些中间件就会以Http pipeline的管道方 ...

  3. 图解Go语言内存分配

    目录 基础概念 内存管理单元 内存管理组件 mcache mcentral mheap 内存分配流程 总结 参考资料 Go语言内置运行时(就是runtime),抛弃了传统的内存分配方式,改为自主管理. ...

  4. Python:os 模块常用方法简介

    返回当前工作目录 os.getcwd() 返回 path 的绝对路径 os.path.abspath(path) os.path.abspath('.') 相当于 os.getcwd() 分割目录和文 ...

  5. 通过 JSONP 实现跨域请求

    优质参考资料:https://www.cnblogs.com/chiangchou/p/jsonp.html https://blog.csdn.net/hansexploration/article ...

  6. 一个tomcat设置多个端口,多个端口对应多个应用

    修改tomcat/conf目录里面server.xml文件 例如下面这样新增一个8090端口,设置下appBase目录,这样就可以用一个tomcat监听多个端口,每个端口都可以放应用了.我这样新增下面 ...

  7. 学JAVA第十八天,接口与抽象类进一步加深

    昨天老师讲了建网站,还要交钱买东西的,所以就没写,今天讲了接口与抽象类进一步加深 上完今天的课后,我才知道一个接口可以有多个实现类,一个实现类可以同时接多个接口. 现在就用代码来解释吧!!! 举例用人 ...

  8. 深挖 NPM 机制

    使用NPM安装的时候会经常出现包冲突(比如多个主模块的子模块版本不一致等),导致在开发过程中会遇到各种或大或小的问题.所有在这会介绍以下内容: NPM 主要安装方式 NPM 包信息查询 NPM 安装机 ...

  9. 46.Odoo产品分析 (五) – 定制板块(2) – 为业务自定义odoo(1)

    查看Odoo产品分析系列--目录 在这一章节中,将学习到如何设置"开发者模式"以及备份数据库:然后学习如何添加字段到数据库并在表单和视图中显示. 1 了解odoo的构架 每一个应用 ...

  10. 一个字符带下滑线的EditText

    效果样式: 这个比较特别的editText是公司的一个新的需求,我也是在网上找了一下,然后看到了一篇博客然后修改成自己需要的样式.这种一般的思路就是在onDraw()方法绘制editText的特别的样 ...