Comments (5)
It is usual to consume 2.5G memory.
VGG model takes a large amount of memory.
Memory usage depends on image size and you can reduce memory usage by using -w image_size
(or --width image_size
) option with small size.
I don't know another way to reduce memory.
from chainer-neural-style.
I know a way to reduce memory.
Try to use Adam optimizer,It will reduce the memory three times,(less than 1g),but I just know this way,I dont know how to implement it in chainer,Hopefully one day you can update it and let the user can choose Adam optimizer;
from chainer-neural-style.
Thank you for your reply.
Chainer supports Adam optimizer and it is easy to use it.
To use Adam, replace this line(https://github.com/dsanno/chainer-neural-style/blob/master/src/style_transfer_runner.py#L52) with optimizer = chainer.optimizers.Adam(10.0)
(I don't know the optimal learning rate for Adam optimizer, but this value seems to work.)
I've tried Adam, but memory usage is almost the same as LBFGS.
from chainer-neural-style.
Hi,Now I have tried Adam,I found that it's useful for using Adam,It just spend a half memory.
Two more question
1、Do you know how to limit the gpu usage(for example limit it in 1G) in this chainer neural style code.
2、What is the meaning of “--resolution (1,2,3)”
from chainer-neural-style.
1、Do you know how to limit the gpu usage(for example limit it in 1G) in this chainer neural style code.
I think Chainer doesn't have a function to limit GPU usage.
Ask Chainer developers.
2、What is the meaning of “--resolution (1,2,3)”
"resolution" means style transfer starts from small image and double the size of it some iterations.
For example --resolution 3 --width 512
- starts from 128px image and
- optimize image for some iterations and double the size of the image (to 256px)
- optimize image for some iterations and double the size of the image (to 512px)
- optimize image for some iterations and style transfer finishes.
from chainer-neural-style.
Related Issues (8)
- Trianing speed is super slow with your L-BFGS HOT 2
- create_chainer_model NO RESPONSE HOT 9
- The problem of First 100 epoch done HOT 2
- use VGG19 model HOT 1
- About parameters modify HOT 6
- Strange error HOT 1
- Cpu mode support? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chainer-neural-style.