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 ...
随机推荐
- Scrapy-redis<数据库篇>
scrapy-redis爬虫数据库连接部分——windows准备做salve,Linux准备做master开展工作 首先处理简单的windows熟悉的环境——安装Redis服务和Redis可视化~可视 ...
- Python存储系统(Memcached)
Memcached是一个自由开源的,高性能,分布式内存对象缓存系统. 本质上,它是一个简洁的key-value存储系统. 其主要用途有:动态数据库缓存.不同应用(语言)中共享数据 安装 安装及命令介绍 ...
- 从壹开始微服务 [ DDD ] 之七 ║项目第一次实现 & CQRS初探
前言 哈喽大家周五好,我们又见面了,感谢大家在这个周五读我的文章,经过了三周的时间,当然每周两篇的速度的情况下,咱们简单说了下DDD领域驱动设计的第一部分,主要包括了,<项目入门DDD架构浅析& ...
- 【深度学习篇】--神经网络中的池化层和CNN架构模型
一.前述 本文讲述池化层和经典神经网络中的架构模型. 二.池化Pooling 1.目标 降采样subsample,shrink(浓缩),减少计算负荷,减少内存使用,参数数量减少(也可防止过拟合)减少输 ...
- js判断参数是否为非数字
isNaN() 函数用于检查其参数是否是非数字值.
- Win32对话框程序(1)
之前学C语言是一直都是在控制台下面操作的,面对的都是黑框框,严重的打击了学习的兴趣.后来在TC下进行C语言课程设计,做了图形界面编程,但都是点线面画的…… 中间隔了好长一段时间没有碰过C语言,最近才开 ...
- DSAPI WIN7风格
在Winform项目中,有时需要将UI变成适应Vista/Windows7/8/10的风格,通过"选用"以下代码来使你的UI支持系统主题渲染. 注:该功能不支持XP,建议使用DS控 ...
- ## 本篇文章对linux常用的一些命令做一下总结,如有需要补充以及不懂得地方,请在下方留言 适合于linux初学者,以及对命令掌握不牢的用来备忘
本篇文章对linux常用的一些命令做一下总结,如有需要补充以及不懂得地方,请在下方留言 适合于linux初学者,以及对命令掌握不牢的用来备忘一,磁盘管理1.显示当前目录位置 pwd2.切换目录 cd ...
- 【转】JavaSE面试题目收集
1.是否可以从一个static方法内部发出对非static方法的调用? 不可以.当一个static方法被调用时,可能还没有创建任何实例对象,如果从一个static方法中发出对非static方法的调用, ...
- Spring Tool Suite4(sts)复制粘贴卡顿(ctrl+v, ctrl+c)、按住ctrl也很卡
最近在看<Spring in Action, Fifth Edition>,下载了Spring Tool Suite4,在使用的过程中发现了一些问题: 只要在复制粘贴(ctrl+c, ct ...