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 ...
随机推荐
- 用ASP.NET Core 2.1 建立规范的 REST API -- 翻页/排序/过滤等
本文所需的一些预备知识可以看这里: http://www.cnblogs.com/cgzl/p/9010978.html 和 http://www.cnblogs.com/cgzl/p/9019314 ...
- Python学习曲线
经历长达近一个月的资源筛选过程终于结束,总共1.5T百度网盘的资源经过:去重.筛选.整理.归档之后一份粗略的Python学习曲线资源已经成型,虽然中间经历了很多坎坷,不过最终还是完成,猪哥也是第一时间 ...
- 网络协议 16 - DNS 协议:网络世界的地址簿
[前五篇]系列文章传送门: 网络协议 11 - Socket 编程(下):眼见为实耳听为虚 网络协议 12 - HTTP 协议:常用而不简单 网络协议 13 - HTTPS 协议:加密路上无尽头 网络 ...
- 【Android Studio安装部署系列】五、新建你的第一个项目:HelloWorld
版权声明:本文为HaiyuKing原创文章,转载请注明出处! 概述 新建项目的步骤. 开始创建项目 如果是刚安装Android studio的话,点击Start a new Android Studi ...
- HttpUtil 【判断网络连接的封装类】
版权声明:本文为HaiyuKing原创文章,转载请注明出处! 前言 该封装类主要包括以下功能: 判断是否有网络连接.判断是否有可用的网络连接: 判断是否是3G网络.判断mobile网络是否可用: 判断 ...
- LitepalNewDemo【开源数据库ORM框架-LitePal2.0.0版本的使用】
版权声明:本文为HaiyuKing原创文章,转载请注明出处! 前言 本Demo使用的是LitePal2.0.0版本,对于旧项目如何升级到2.0.0版本,请阅读<赶快使用LitePal 2.0版本 ...
- Node.js 命令行工具的编写
日常开发中,编写 Node.js 命令行工具来完成一些小任务是很常见的操作.其编写也不难,和日常编写 Node.js 代码并无二致. package.json 中的 bin 字段 一个 npm 模块, ...
- centos7 安装 smplayer
How to setup multimedia on CentOS 7 You will need to also install the EPEL repository as nux-dextop ...
- JCE安装使用报错
"description":"No key was installed for encryption service","status":& ...
- [Nodejs] 用node写个爬虫
寻找爬取的目标 首先我们需要一个坚定的目标,于是找个一个比较好看一些网站,将一些信息统计一下,比如 url/tag/title/number...等信息 init(1, 2); //设置页数,现在是1 ...