I installed Deel made by shi3z.
Running tiny.py in Listing 1.1 in the book It is said that there is no protobuf2 as shown below.
python tiny.py
Traceback (most recent call last):
File "tiny.py", line 2, in <module>
from deel.network import *
File "/home/keigo/Development/deel/deel/network/__init__.py", line 5, in <module>
from deel.model.caffefunction import CaffeFunction
File "/home/keigo/Development/deel/deel/model/caffefunction.py", line 38, in <module>
from chainer.links.caffe.protobuf2 import caffe_pb2 as caffe_pb
ImportError: No module named protobuf2
The version of chainer is in the reference book It was 1.14.1, but if you specify that version, this is also It is said that the version does not exist. I installed 1.17.0 and the sample worked fine.
$ sudo pip install chainer=="1.17.0"
$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import chainer
chainer.__version__
>>> chainer.__version__
'1.17.0'
$ python tiny.py
Loading bvlc_alexnet.caffemodel
Converting from bvlc_alexnet.caffemodel
data 5
conv1 4
relu1 18
norm1 15
pool1 17
conv2 4
relu2 18
norm2 15
pool2 17
conv3 4
relu3 18
conv4 4
relu4 18
conv5 4
relu5 18
pool5 17
fc6 14
relu6 18
drop6 6
fc7 14
relu7 18
drop7 6
fc8 14
loss 21
#1 | loupe, | 22.5%
#2 | hook, | 10.0%
#3 | corkscrew, | 5.2%
#4 | combination | 4.2%
#5 | stethoscope | 4.1%
#6 | buckle | 4.0%
#7 | face | 3.3%
#8 | stopwatch, | 2.5%
#9 | cassette | 2.0%
#10 | analog | 1.4%
#11 | knot | 1.4%
#12 | digital | 1.4%
#13 | chain | 1.2%
#14 | padlock | 1.2%
#15 | muzzle | 1.1%
#16 | magnetic | 1.0%
#17 | lens | 1.0%
#18 | sunglasses, | 0.9%
#19 | whistle | 0.8%
#20 | nail | 0.8%
Well, is this the right version for reading the book? It's suspicious, but for the time being, I will proceed as it is If it doesn't work, I'll revise this article as well. First of all, leave a memo as a memorandum.
Reference book First Deep Learning Programming [github uei/deel] (https://github.com/uei/deel/tree/master/examples)
Recommended Posts