apple2373 / chainer_stylenet Goto Github PK
View Code? Open in Web Editor NEWA Neural Algorithm of Artistic Style
Home Page: http://t-satoshi.blogspot.com/2015/09/a-neural-algorithm-of-artistic-style.html
A Neural Algorithm of Artistic Style
Home Page: http://t-satoshi.blogspot.com/2015/09/a-neural-algorithm-of-artistic-style.html
chainer_stylenet-master> sudo python style_net.py -g -1 -c kinkaku.jpg -s style.png -d kinkaku Traceback (most recent call last): File "style_net.py", line 130, in p=readimage(content_image)#read content image File "style_net.py", line 62, in readimage img = imresize(img,[224, 224]) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy/misc/pilutil.py", line 411, in imresize im = toimage(arr, mode=mode) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy/misc/pilutil.py", line 228, in toimage raise ValueError("'arr' does not have a suitable array shape for any mode.") ValueError: 'arr' does not have a suitable array shape for any mode.
After installing all the dependencies, the demo command
"python style_net.py -g -1 -c kinkaku.jpg -s style.png -d kinkaku"
seems begin to work correctly.
And I got:
Loading caffe model.It takes time...
Then got the error:
—————————————————————————————————————————————
Traceback (most recent call last):
File "style_net.py", line 134, in
func = caffe.CaffeFunction('VGG_ILSVRC_19_layers.caffemodel')
File "/usr/lib/python2.6/site-packages/chainer/functions/caffe/caffe_function.py", line 108, in init
net.MergeFromString(model_file.read())
File "/usr/lib/python2.6/site-packages/google/protobuf/internal/python_message.py", line 841, in MergeFromString
if self._InternalParse(serialized, 0, length) != length:
File "/usr/lib/python2.6/site-packages/google/protobuf/internal/python_message.py", line 874, in InternalParse
pos = field_decoder(buffer, new_pos, end, self, field_dict)
File "/usr/lib/python2.6/site-packages/google/protobuf/internal/decoder.py", line 633, in DecodeRepeatedField
if value.add()._InternalParse(buffer, pos, new_pos) != new_pos:
File "/usr/lib/python2.6/site-packages/google/protobuf/internal/python_message.py", line 874, in InternalParse
pos = field_decoder(buffer, new_pos, end, self, field_dict)
File "/usr/lib/python2.6/site-packages/google/protobuf/internal/decoder.py", line 633, in DecodeRepeatedField
if value.add()._InternalParse(buffer, pos, new_pos) != new_pos:
File "/usr/lib/python2.6/site-packages/google/protobuf/internal/python_message.py", line 874, in InternalParse
pos = field_decoder(buffer, new_pos, end, self, field_dict)
File "/usr/lib/python2.6/site-packages/google/protobuf/internal/decoder.py", line 220, in DecodePackedField
value.append(element)
File "/usr/lib/python2.6/site-packages/google/protobuf/internal/containers.py", line 111, in append
self._values.append(self._type_checker.CheckValue(value))
MemoryError
—————————————————————————————————————————————
And I have observed the memory usage,it's not exhausted. So anyone have the same problem?
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.