Comments (6)
I'm wondering if the second and third issues in my list are caused by software versions... I had to upgrade Theano to the version in the Git repository since the PIP version did not have pooling modes for convolution required by the latest Lasagne—and it causes an error otherwise. I believe things were more reliable before the upgrade (though I had to hack the average pooling out for it to work).
Which combination of versions/revisions were you using for Lasagne and Theano?
from recipes.
It'd be easier to work with and make pull requests if this was a script rather than a notebook, but it's up to you.
It's mostly a notebook because they can be browsed and rendered directly on github: https://github.com/Lasagne/Recipes/blob/master/examples/styletransfer/Art%20Style%20Transfer.ipynb
We'd lose that if it was a script.
Is there a way to force it to just allocate the buffers it needs once then keep them in memory throughout the process?
Yes, just set THEANO_FLAGS=lib.cnmem=.5
to have it allocate 50% of GPU memory from the start, or THEANO_FLAGS=lib.cnmem=600
to have it allocate 600 MiB. In addition, you can tell it not to release memory in between, via THEANO_FLAGS=allow_gc=0
, or even combine both: THEANO_FLAGS=lib.cnmem=600,allow_gc=0
(that's faster then either of those alone). You can also make those permanent in your ~/.theanorc
:
[global]
floatX = float32
device = gpu
allow_gc = False
[lib]
cnmem=600
I had to upgrade Theano to the version in the Git repository since the PIP version did not have pooling modes for convolution required by the latest Lasagne
Yes, we've tried to prominently mention this in the install instructions: http://lasagne.readthedocs.org/en/latest/user/installation.html#stable-lasagne-release
Which combination of versions/revisions were you using for Lasagne and Theano?
I'm working with the bleeding-edge version of both (that's required for lib.cnmem
), but I don't know which version @ebenolson used for the notebook. Maybe we should include that information in the notebook? Since the release of Lasagne we did not change anything that would affect backwards-compatibility, though, so I'd expect it to work the same no matter which version you're using.
I'll leave the other technical questions up to Eben!
from recipes.
Hi @alexjc, thanks for the questions.
I don't know what versions I was using, but they were likely the current master when the notebook was committed - I think it is probably fine with the current versions, but I'll try to rerun later and confirm that.
I haven't seen that particular LBFGS error, but using scipy is definitely a weak point, I'd like to find an alternative - perhaps I will see if the Torch optimizer can be wrapped/converted easily.
As for edge/image size effects I haven't really investigated, I'll have to get back to you on that.
from recipes.
Many thanks @f0k and @ebenolson.
I've traced the major problems down to using optimizer=fast_compile
and exception_verbosity=high
which I had enabled for testing algorithm changes. With those two flags set, LBFGS fails randomly and I presume any form of gradient descent would fail also if the function compiled wrong.
I will report back on the other two issues, which seem minor in comparison!
from recipes.
I have also seen weird border effects when I have used this example for my own work. Have we figured out a reason for this? :)
from recipes.
@christopher-beckham Try using an image size that's a multiple of 16 or 32, depending on which layers you use.
from recipes.
Related Issues (20)
- 3D UNet implementation HOT 7
- reason behind low value of parameters in VGG19 HOT 1
- error when set values for vgg-19 HOT 2
- modelzoo resnet50.py incompatible to Python 3 HOT 3
- Implementation of Convolutional Spatial Transformer and Siamese network HOT 3
- no sandbox.cuda
- Bad argument to Theano: No. of dimensions changes in the error after reshaping
- Question not an Issue: fliping the arrays HOT 1
- cifar100 with resnet HOT 1
- pretrained network for small images HOT 1
- https://s3.amazonaws.com/lasagne/recipes/pretrained/imagenet/vgg16.pkl HOT 6
- vgg16.pkl without aws cli
- Need help with S3 Browser based downloads HOT 1
- Dice coeff is not changing since the first epoch and binary accuracy changes and is increased to 1?
- Problem with op.grad in OpFromGraph - Guided Backpropagation
- Wrong order of stride and pad arguments in build_simple_block HOT 3
- Broken links in Video features with C3D.ipynb example HOT 5
- Training C3D
- Wrong pretrained weights for UNet example HOT 1
- DICE coefficient loss function HOT 23
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 recipes.