Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some kind of issue when python3 train.py -action c3 -caffe 0 #13

Closed
HoboChen opened this issue Sep 18, 2017 · 3 comments
Closed

some kind of issue when python3 train.py -action c3 -caffe 0 #13

HoboChen opened this issue Sep 18, 2017 · 3 comments

Comments

@HoboChen
Copy link

hello, i have no idea what is wrong. thanks in advance

done:
git clone --recursive https://github.com/yihui-he/channel-pruning.git
make -j8 && make pycaffe

fail:
python3 train.py -action c3 -caffe 0

stdout:

no lighting pack
Failed to include caffe_pb2, things might go wrong!
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/google/protobuf/internal/python_message.py", line 1069, in MergeFromString
if self._InternalParse(serialized, 0, length) != length:
File "/usr/local/lib/python3.4/dist-packages/google/protobuf/internal/python_message.py", line 1091, in InternalParse
(tag_bytes, new_pos) = local_ReadTag(buffer, pos)
File "/usr/local/lib/python3.4/dist-packages/google/protobuf/internal/decoder.py", line 181, in ReadTag
while six.indexbytes(buffer, pos) & 0x80:
TypeError: unsupported operand type(s) for &: 'str' and 'int'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "train.py", line 19, in
from lib.net import Net, load_layer, caffe_test
File "/home/t-jinche/channel-pruning/lib/net.py", line 7, in
import caffe
File "/home/t-jinche/channel-pruning/caffe/python/caffe/init.py", line 4, in
from .proto.caffe_pb2 import TRAIN, TEST
File "/home/t-jinche/channel-pruning/caffe/python/caffe/proto/caffe_pb2.py", line 799, in
options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), '\020\001')),
File "/usr/local/lib/python3.4/dist-packages/google/protobuf/descriptor.py", line 874, in _ParseOptions
message.ParseFromString(string)
File "/usr/local/lib/python3.4/dist-packages/google/protobuf/message.py", line 185, in ParseFromString
self.MergeFromString(serialized)
File "/usr/local/lib/python3.4/dist-packages/google/protobuf/internal/python_message.py", line 1075, in MergeFromString
raise message_mod.DecodeError('Truncated message.')
google.protobuf.message.DecodeError: Truncated message.

@ethanhe42
Copy link
Owner

Duplicate of #12

@ethanhe42 ethanhe42 marked this as a duplicate of #12 Sep 18, 2017
@ethanhe42
Copy link
Owner

According to BVLC/caffe#2464, this problem is solved in latest Caffe version. Since I can't reproduce this problem, I've merge my Caffe to the latest BVLC/caffe. Please update and try remake.

@cateweb
Copy link

cateweb commented Jul 9, 2018

solved with sudo pip3 install sklearn-contrib-lightning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants