keras04 GAN simple
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的更多相关文章
- (转) Read-through: Wasserstein GAN
Sorta Insightful Reviews Projects Archive Research About In a world where everyone has opinions, on ...
- [转]GAN论文集
really-awesome-gan A list of papers and other resources on General Adversarial (Neural) Networks. Th ...
- GAN实战笔记——第六章渐进式增长生成对抗网络(PGGAN)
渐进式增长生成对抗网络(PGGAN) 使用 TensorFlow和 TensorFlow Hub( TFHUB)构建渐进式增长生成对抗网络( Progressive GAN, PGGAN或 PROGA ...
- PHP设计模式(一)简单工厂模式 (Simple Factory For PHP)
最近天气变化无常,身为程序猿的寡人!~终究难耐天气的挑战,病倒了,果然,程序猿还需多保养自己的身体,有句话这么说:一生只有两件事能报复你:不够努力的辜负和过度消耗身体的后患.话不多说,开始吧. 一.什 ...
- Design Patterns Simplified - Part 3 (Simple Factory)【设计模式简述--第三部分(简单工厂)】
原文链接:http://www.c-sharpcorner.com/UploadFile/19b1bd/design-patterns-simplified-part3-factory/ Design ...
- WATERHAMMER: A COMPLEX PHENOMENON WITH A SIMPLE SOLUTION
开启阅读模式 WATERHAMMER A COMPLEX PHENOMENON WITH A SIMPLE SOLUTION Waterhammer is an impact load that is ...
- BZOJ 3489: A simple rmq problem
3489: A simple rmq problem Time Limit: 40 Sec Memory Limit: 600 MBSubmit: 1594 Solved: 520[Submit] ...
- 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 ...
- ZOJ 3686 A Simple Tree Problem
A Simple Tree Problem Time Limit: 3 Seconds Memory Limit: 65536 KB Given a rooted tree, each no ...
随机推荐
- 蓝牙协议中的SBC编解码原理和仿真
一.SBC的原理 SBC是subband codec的缩写,中文叫做次频带编码,也叫子带编码.其基本原理是把信号的频率分为若干子带,然后对每个子带进行编码,并根据每个子带的重要性及特点分配不同的位数( ...
- Castle Windsor 的动态代理类如何获取实际类型
问题 在实际开发过程当中我们可能会针对某些类型使用动态代理技术(AOP),注入了一些拦截器进行处理,但是一旦某个类型被动态代理了,那么就会生成一个代理类.这个时候在该类内部使用 GetType() 方 ...
- Linux 进程终止后自动重启
/opt/a.sh #! /bin/bash ps -ef | grep python3 a.py | grep -v grep | grep python3 if [ $? -ne 0 ] then ...
- 写给 Android 开发的小程序布局指南,Flex 布局!
一.序 Hi,大家好,我是承香墨影! 最近在做小程序,验证一些方向,开发效率确实很快,就是各种微信的审核有点费劲,但是总归是有办法解决的. 想要开发一款小程序,其实和我们正常写一款 App 类似,你需 ...
- ubuntu16.04无法获取ip地址的解决方案
当我们无法获取ip地址时可以使用dhcp来动态获取ip地址,安装dhcpcd5和dhcpcd-gtk sudo apt-get install dhcpcd5 sudo apt-get install ...
- 一套代码小程序&Web&Native运行的探索06——组件系统
接上文:一套代码小程序&Web&Native运行的探索05——snabbdom 对应Git代码地址请见:https://github.com/yexiaochai/wxdemo/tre ...
- 【JVM系列】一步步解析java执行内幕
对于任何一门语言,要想达到精通的水平,研究它的执行原理(或者叫底层机制)不失为一种良好的方式.在本篇文章中,将重点研究java源代码的执行原理,即从程 序员编写JAVA源代码,到最终形成产品,在整个过 ...
- Java 中的几种线程池,你之前用对了吗
好久不发文章了,难道是因为忙,其实是因为懒.这是一篇关于线程池使用和基本原理的科普水文,如果你经常用到线程池,不知道你的用法标准不标准,是否有隐藏的 OOM 风险.不经常用线程池的同学,还有对几种线程 ...
- java的设计模式 - Builder模式
Builder 模式的目的? 构造对象的方式过于复杂,不如将之抽离出来.比如,构造器参数过多 这样说也有点抽象,举个例子吧. 举个例子 比如 非常热门的消息队列RabbitMQ 的 AMQP.Basi ...
- 小游戏大智慧,10 个让人眼前一亮的 JavaScript 游戏
摘要: JS还可以这么玩~ Fundebug经授权转载,版权归原作者所有. 这是一篇有趣的文章,我们精选了 JS13K 游戏编程挑战的优秀作品,与大家分享.JS13K 是专为 JavaScript 开 ...