Giter VIP home page Giter VIP logo

chainer-neural-style's People

Contributors

dsanno avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

chainer-neural-style's Issues

Strange error

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)

How to reduce the GPU memory using

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~

The problem of First 100 epoch done

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:
lion
after 100 epoch:
out_0100
but after 200 epoch done:
200

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?

create_chainer_model NO RESPONSE

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 .

use VGG19 model

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~

About parameters modify

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~

Trianing speed is super slow with your L-BFGS

Hi,
Thank you for your post, it helps a lot. However when I tried to use it I found that it ios very slow even with GPU. With SGU and only one training sample it took 3minutes while with L-BFGS it couldn't reach convergence for 1 hour! Is there anything wrong?

P.s. The structure of network consists only three liner layers.

Best,
Itsu

Cpu mode support?

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.