-
Notifications
You must be signed in to change notification settings - Fork 231
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
KeyError: 'layer1-conv' #28
Comments
Hi,doublegssc, |
你的这个darknet2caffe.py代码是我这个工程里面的么,还是我给你的链接工程里面的? |
是你这个工程里面的。。 |
我的命令是: |
我需要看你的整个darknet2caffe.py的代码以及你运行错误的整个日志。 |
darknet2caffe.py的代码为: The caffe module needs to be on the Python path;we'll add it here explicitly.caffe_root='/home/user/caffe/' def darknet2caffe(cfgfile, weightfile, protofile, caffemodel):
def load_conv2caffe(buf, start, conv_param): def load_fc2caffe(buf, start, fc_param): def load_conv_bn2caffe(buf, start, conv_param, bn_param, scale_param):
def cfg2prototxt(cfgfile):
if name == 'main':
------------------------------------ 运行错误的整个日志为: ------------------------------------ ---------------------------------------------- |
看上去是你的文件格式有问题,转换上是没问题的,你检查一下你的python。看一下为什么你生成prototxt里面pad的值还有0.5这种参数,在我的理解是这个参数都是int的。多多baidu和google一下吧! |
好的。。我用的python3.5,Ubuntu16.04。。python只能使用python2吗?还是python3也可以? |
应该是可以的,我没用python3。我这个代码用的是python2.7 + caffe + pytorch0.4的环境。 |
好的。。谢谢您,我再看一下。。 |
在python3环境下,需要修改convolution_param['pad'] = str(int(convolution_param['kernel_size'])/2) 为 convolution_param['pad'] = str(int(int(convolution_param['kernel_size'])/2)),否则产生的PAD可能为浮点。我也觉得很奇怪,难道python2.7没有个问题吗? |
lz应该用了python3 我Python3也是这样 雪坑 |
Get the same error ! With python3.. |
Solved by setup my config with Ubuntu 16.04, cuda 8.0, Python 2.7 and pytorch 0.4. |
请问解决了吗 |
the same issue in python 3. |
you can change the prototxt.py: |
hi fanhongyuan =========>it works, thanks.but i meet another issue :
|
there is something wrong with your prototxt, you should check it. |
楼主我也是这样的问题问下您该如何解决呢 |
hi, ChenYingPeng
我运行了你的darknet2caffe代码,然后遇到了这个错误:
------------
Traceback (most recent call last):
File "darknet2caffe.py", line 429, in
darknet2caffe(cfgfile, weightfile, protofile, caffemodel)
File "darknet2caffe.py", line 57, in darknet2caffe
start = load_conv_bn2caffe(buf, start, params[conv_layer_name], params[bn_layer_name], params[scale_layer_name])
KeyError: 'layer1-conv'
------------
我加载的是yolov3-tiny版模型。
请问是哪里出现问题了吗?
The text was updated successfully, but these errors were encountered: