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

question about add parameter yolo_data_type in batch_sampler? #278

Open
18242360613 opened this issue Mar 3, 2021 · 0 comments
Open

question about add parameter yolo_data_type in batch_sampler? #278

18242360613 opened this issue Mar 3, 2021 · 0 comments

Comments

@18242360613
Copy link

I'm trying to use pycaffe to write model structures and generate prototxt files. However, when defining the batchsampler in the annotateddata data layer, it prompts "attributeerror: Yolo"_ data_ type”。

batch_sampler定义如下。
batch_sampler = [
{'yolo_data_type':1},
{
'sampler': {
},
'max_trials': 1,
'max_sample': 1,
},
....
]

##key code
net = caffe.NetSpec()
net.data, net.label = CreateAnnotatedDataLayer(data_path, batch_size=8,
train=True, output_label=True, label_map_file=label_map_file,
transform_param=train_transform_param,
batch_sampler=batch_sampler)
print(net.to_proto())

##errors
Traceback (most recent call last):
File "/workspace/yolo_caffe_nnie/data_para.py", line 319, in
print(net.to_proto())
File "/workspace/MobileNet-YOLO/python/caffe/net_spec.py", line 213, in to_proto
top._to_proto(layers, names, autonames)
File "/workspace/MobileNet-YOLO/python/caffe/net_spec.py", line 100, in _to_proto
return self.fn._to_proto(layers, names, autonames)
File "/workspace/MobileNet-YOLO/python/caffe/net_spec.py", line 162, in _to_proto
assign_proto(layer, k, v)
File "/workspace/MobileNet-YOLO/python/caffe/net_spec.py", line 77, in assign_proto
assign_proto(getattr(proto, name), k, v)
File "/workspace/MobileNet-YOLO/python/caffe/net_spec.py", line 72, in assign_proto
assign_proto(proto_item, k, v)
File "/workspace/MobileNet-YOLO/python/caffe/net_spec.py", line 64, in assign_proto
is_repeated_field = hasattr(getattr(proto, name), 'extend')
AttributeError: yolo_data_type

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

1 participant