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 ...
随机推荐
- Hangfire源码解析-如何实现可扩展IOC的?
一.官方描述 These projects simplify the integration between Hangfire and your favorite IoC Container. The ...
- 1. 容器化部署一套云服务 第一讲 Jenkins(Docker + Jenkins + Yii2 + 云服务器))
容器化部署一套云服务系列 1. 容器化部署一套云服务之Jenkins 一.购买服务器 服务器
- AntZipUtils【基于Ant的Zip压缩解压缩工具类】
版权声明:本文为HaiyuKing原创文章,转载请注明出处! 前言 Android 压缩解压zip文件一般分为两种方式: 基于JDK的Zip压缩工具类 该版本存在问题:压缩时如果目录或文件名含有中文, ...
- .NET Core 的缓存篇之MemoryCache
前言 对于缓存我们都已经很熟悉了,缓存分为很多种,浏览器缓存.试图缓存.服务器缓存.数据库缓存等等一些,那今天我们先介绍一下视图缓存和MemoryCache内存缓存的概念和用法: 视图缓存 在老的版本 ...
- Python:fake-useragent 伪装请求头
写爬虫的时候,在进行 request 请求的时候,多数情况下需要添加请求头,否则就不能正常请求. 添加请求头最常用的做法是修改 User-Agent 来伪装浏览器. 以前在写请求头的时候,都是通过 c ...
- 装箱问题的CPLEX求解
装箱问题(Bin Packing Problem) 装箱问题即搬家公司问题.一个搬家公司有无限多的箱子,每个箱子的承重上限为W,当搬家公司进入一个房间时,所有物品都必须被装入箱子,每个物品的重量为wi ...
- 二分查找BinarySearch(Java)
二分查找(折半查找)BinarySearch 二分查找 一组排好顺序的数,查找其中的一个数(value)的位置,按照数组(int[] a)存放这组数据,数组的索引所指的位置就是需要查找的数,用三个变 ...
- Android为TV端助力:RecyclerView更新数据时焦点丢失
1.adapter的setHasStableIds设置成true 2.重写adapter的getItemId方法 @Override public long getItemId(int positio ...
- Android Fragment碎片
什么是碎片? 碎片(Fragment)是一种可以嵌入在活动当中的UI片段,它能让程序更加合理和充分地利用大屏幕的空间,因而在平板上应用的非常广泛.可以把Fragment当成Activity一个界面的一 ...
- 【Spring Cloud笔记】 断路器-hystrix
在微服务架构中,一个微服务的超时失败可能导致瀑布式连锁反映,Spring Cloud Netflix 的断路器Hystrix通过自主反馈,防止了这种情况发生.下面介绍简单的断路器使用方法. [step ...