dsanno / chainer-neural-style Goto Github PK
View Code? Open in Web Editor NEWimplementation of neural style using Chainer
License: Other
implementation of neural style using Chainer
License: Other
Thanks for your contribution
This implement is very beatiful .but I have a question that how to reduce the memory using?
It's about 2.5G taking up now~
Do you have some suggestion . or Will you update a new algorithm for solve this problem~
epoch 100 done
losses:
content_3_3: 7987.070312
content_4_3: 601.299927
style_1_2 : 3854174464.000000
style_2_2 : 7261279232.000000
style_3_3 : 1873770624.000000
style_4_3 : 32007.861328
tv : 360171.218750
when the first 100 epoch done,The result sometimes have no any change....
content image:
after 100 epoch:
but after 200 epoch done:
So,It looks like the first 100 epoch almost can not effect the content image ; Is it a bug?or do you have some advise for solving it?
HI:
I had downloaded the VGG_ILSVRC_16_layers.caffemodel in the directory.
But when I run creat_chainer_model.py,It just stop in load model without any change.
Is it a bug? what should I do for this .
When I try to transfer a phoho with this command:
DOVANtekiMacBook-Pro:chainer-neural-style DOVAN$ time python src/run.py -c /Users/DOVAN/Desktop/model.png -s /Users/DOVAN/Desktop/111.png -o /Users/DOVAN/Desktop/chai/modelcat -g -1 --match_color_histogram
loading content image completed
/Users/DOVAN/deeprely/chainer-neural-style/src/util.py:113: RuntimeWarning: invalid value encountered in sqrt
b_sigma = v.dot(np.diag(d ** 0.5)).dot(v.T)
loading style image completed
loading neural network model completed
/Users/DOVAN/anaconda2/lib/python2.7/site-packages/chainer/functions/activation/relu.py:44: RuntimeWarning: invalid value encountered in greater
return utils.force_array(gy[0] * (x[0] > 0)),
epoch 100 done
losses:
content_4_2: nan
style_1_2 : nan
style_2_2 : nan
style_3_2 : nan
style_4_2 : nan
tv : nan
epoch 200 done
losses:
content_4_2: nan
style_1_2 : nan
style_2_2 : nan
style_3_2 : nan
style_4_2 : nan
tv : nan
epoch 300 done
losses:
content_4_2: nan
style_1_2 : nan
style_2_2 : nan
style_3_2 : nan
style_4_2 : nan
tv : nan
Why all of loss are nan ~;
It's a bug in --match_color_histogram ?
(without this match_color,everything is fine)
Hi:
https://github.com/cysmith/neural-style-tf/blob/master/neural_style.py
In this implement of neural-style parameters:
parser.add_argument('--content_layers', nargs='+', type=str,
default=['conv4_2']:
parser.add_argument('--style_layers', nargs='+', type=str,
default=['relu1_1', 'relu2_1', 'relu3_1', 'relu4_1', 'relu5_1'],
content layer is conv4_2,style layer is 'relu1_1', 'relu2_1', 'relu3_1', 'relu4_1', 'relu5_1'
So,If I wanna use the TF's parameters in your chainer implement:
parser.add_argument('--content_layers', default='3_3,4_3', type=str,
help='content layer names')
parser.add_argument('--style_layers', default='1_2,2_2,3_3,4_3', type=str,
help='style layer names')
How to set the content layers and style layers~ Thank you~
Looks like --gpu -1 flag doesn't affect for program.
When I use this command:
python src/run.py -c re.jpg -s 4.jpg --gpu -1
I receive this output:
loading content image completed
loading style image completed
loading neural network model completed
Traceback (most recent call last):
File "src/run.py", line 51, in <module>
style_transfer_runner.run(args)
File "/home/z/cns/src/style_transfer_runner.py", line 73, in run
out_image = model.fit(content_image, style_image, args.iter, on_epoch_done)
File "/home/z/cns/src/neural_style.py", line 34, in fit
with cuda.Device(device_id):
AttributeError: 'module' object has no attribute 'Device'
Same output with command without --gpu flag at all
I have download the vgg19caffemodel,
How to use python src/create_chainer_model.py to swich to vgg19 instead of vgg16
Can you update the README.MD for this, thank you~
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.