Skip to content

AttributeError: module 'google.protobuf.descriptor' has no attribute '_message' #9

@lunasdejavu

Description

@lunasdejavu

what is the version of the protobuf you use?
I just copied

import torch
from caffemodel2pytorch import caffemodel2pytorch

model = caffemodel2pytorch.Net(
	prototxt = 'mobilenet_deploy.prototxt',
	weights = 'mobilenet.caffemodel',
	caffe_proto = 'https://raw.githubusercontent.com/BVLC/caffe/master/src/caffe/proto/caffe.proto'
)
model.cuda()
model.eval()
torch.set_grad_enabled(False)

it just showed the error :

Traceback (most recent call last):
  File "test_torch.py", line 7, in <module>
    caffe_proto = 'https://raw.githubusercontent.com/BVLC/caffe/master/src/caffe
/proto/caffe.proto'
  File "C:\LPR\MobileNet-Caffe\caffemodel2pytorch\caffemodel2pytorch.py", line 7
1, in __init__
    self.net_param = initialize(caffe_proto).NetParameter()
  File "C:\LPR\MobileNet-Caffe\caffemodel2pytorch\caffemodel2pytorch.py", line 4
1, in initialize
    old_pool = google.protobuf.descriptor._message.default_pool
AttributeError: module 'google.protobuf.descriptor' has no attribute '_message'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions