chengyangfu / caffe

Caffe: a fast open framework for deep learning.
http://caffe.berkeleyvision.org/
Other
169 stars 47 forks source link

Prototxt creation error #1

Closed miquelmarti closed 7 years ago

miquelmarti commented 7 years ago

When running python examples/ssd/ssd_coco_resnet_513.py or python examples/ssd/ssd_pascal_resnet_321.py I get this same error:

Traceback (most recent call last): File "examples/ssd/ssd_pascal_resnet_321.py", line 453, in print(net.to_proto(), file=f) File "/home/miquelmr/Documents/caffeDSSD/python/caffe/net_spec.py", line 209, in to_proto top._to_proto(layers, names, autonames) File "/home/miquelmr/Documents/caffeDSSD/python/caffe/net_spec.py", line 100, in _to_proto return self.fn._to_proto(layers, names, autonames) File "/home/miquelmr/Documents/caffeDSSD/python/caffe/net_spec.py", line 164, in _to_proto assign_proto(layer, k, v) File "/home/miquelmr/Documents/caffeDSSD/python/caffe/net_spec.py", line 64, in assign_proto is_repeated_field = hasattr(getattr(proto, name), 'extend') AttributeError: 'LayerParameter' object has no attribute 'start'

I am trying to train ssd with resnet 50 and I wanted to see how it was done for resnet 101. If you could share the prototxts and solver would be also great.

chengyangfu commented 7 years ago

Thanks. I just fixed this part. There was some inconsistent naming between me and Wei. The script should be correct now. If you use the pretrained-model, you need to change "start" to "offset" in PriorBox Layers in the prototxt.

adithya-p commented 5 years ago

@chengyangfu I am trying to train ssd with resnet 50 on 512x512. Modified width and height in the script provided and invoking ResNet50Body function. But I still get a similar error:

Traceback (most recent call last):
  File "examples/ssd/ssd_resnet_512.py", line 461, in <module>
    print(net.to_proto(), file=f)
  File "/media/cheling/digits/caffe/python/caffe/net_spec.py", line 209, in to_proto
    top._to_proto(layers, names, autonames)
  File "/media/cheling/digits/caffe/python/caffe/net_spec.py", line 100, in _to_proto
    return self.fn._to_proto(layers, names, autonames)
  File "/media/cheling/digits/caffe/python/caffe/net_spec.py", line 164, in _to_proto
    assign_proto(layer, k, v)
  File "/media/cheling/digits/caffe/python/caffe/net_spec.py", line 64, in assign_proto
    is_repeated_field = hasattr(getattr(proto, name), 'extend')
AttributeError: start

Can you please tell me how do I fix this issue? And What changes do I need to make it work for resnet-50 with 512x512 input image?