python - Error when running deepdream on Ubuntu 14.04 -


when run deep dream on ubuntu 14.04 presented error:

traceback (most recent call last):   file "dream.py", line 7, in <module> google.protobuf import text_format importerror: no module named google.protobuf 

when run python --version this:

python 2.7.10 :: anaconda 2.3.0 (64-bit)

i have made sure follow install instructions , have installed dependencies. not sure why getting error appreciated.

protobuf used add single line deploy.prototxt file. can add line: force_backward: true deploy.prototxt , remove dependency.

you have change code from:

model = caffe.io.caffe_pb2.netparameter() text_format.merge(open(net_fn).read(), model) model.force_backward = true open('tmp.prototxt', 'w').write(str(model))  net = caffe.classifier('tmp.prototxt', param_fn,                        mean = np.float32([104.0, 116.0, 122.0]), # imagenet mean, training set dependent                        channel_swap = (2,1,0)) # reference model has channels in bgr order instead of rgb 

to:

net = caffe.classifier(net_fn, param_fn,                        mean = np.float32([104.0, 116.0, 122.0]), # imagenet mean, training set dependent                        channel_swap = (2,1,0)) # reference model has channels in bgr order instead of rgb 

and remove line

from google.protobuf import text_format 


if want try out deepdream have @ deepdreamer


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -