Open dovanchan opened 7 years ago
Are there any console messages? If the console is showing "load VGG16 caffemodel", the program should be loading caffe model file. It takes several minutes, and please be patient.
I have waited about 1 hours, It still no complete the loading~I had tried many times, it still no work
Stop at here: /chainer-neural-style$ python src/create_chainer_model.py load VGG16 caffemodel .
Can you create CaffeFunction instance? Please confirm if CaffeFunction constructor works as follows:
(on Python interactive shell)
>>> from chainer.links.caffe import CaffeFunction
>>> ref = CaffeFunction('VGG_ILSVRC_16_layers.caffemodel')
If it doesn't work, I think Chainer or protobuf package may not be correctly installed or caffe model file may be corrupted.
from chainer.links.caffe import CaffeFunction ref = CaffeFunction('VGG_ILSVRC_16_layers.caffemodel') Traceback (most recent call last): File "
", line 1, in File "/home/cu_00095/.local/lib/python2.7/site-packages/chainer/links/caffe/caffe_function.py", line 133, in init with open(model_path, 'rb') as model_file: IOError: [Errno 2] No such file or directory: 'VGG_ILSVRC_16_layers.caffemodel'
Can you tell me where is the correct path for the VGG_ILSVRC_16_layers.caffemodel?
I had tried to put it in /chainer-neural-style or . /chainer-neural-style/src
But it still IOError: [Errno 2] No such file or directory: 'VGG_ILSVRC_16_layers.caffemodel'
The correct path for VGG_ILSVRC_16_layers.caffemodel is "chainer-neural-style". In more detail
You can use os.path.exists
to check whether the file exists or not.
cu_00095@gtx1080:~/chainer-neural-style$ ls LICENSE README.md src VGG_ILSVRC_16_layers.caffemodel cu_00095@gtx1080:~/chainer-neural-style$ python src/create_chainer_model.py load VGG16 caffemodel
cu_00095@gtx1080:~$ python Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from chainer.links.caffe import CaffeFunction ref = CaffeFunction('VGG_ILSVRC_16_layers.caffemodel') Traceback (most recent call last): File "
", line 1, in File "/home/cu_00095/.local/lib/python2.7/site-packages/chainer/links/caffe/caffe_function.py", line 133, in init with open(model_path, 'rb') as model_file: IOError: [Errno 2] No such file or directory: 'VGG_ILSVRC_16_layers.caffemodel'
I have done these, But it always stop at here I had tried many times, it still no work
The VGG_ILSVRC_16_layers.caffemodel has exist in the chainer-neural-style,I have checked many times; But It still have a error for No such file.~ Is it a bug need to be fixed?
just stop at load model~
Did you check VGG_ILSVRC_16_layers.caffemodel exists on Python shell ? For example, do these commands work?
>>> import os
>>> os.getcwd()
'/path/to/current/working/directory'
>>> os.path.exists('VGG_ILSVRC_16_layers.caffemodel')
True
>>> f = open('VGG_ILSVRC_16_layers.caffemodel', 'rb')
>>> f.close()
I have put the file "VGG_ILSVRC_16_layers.caffemodel" under '/chainer-neural-style', But run os.path.exists('VGG_ILSVRC_16_layers.caffemodel') . failed.... What should I do to let the python findout this model~
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 .