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

您好,请问一下训练的时候出现输入参数不足应该怎么解决? #9

Open
bozki opened this issue May 20, 2020 · 8 comments

Comments

@bozki
Copy link

bozki commented May 20, 2020

输入参数的数目不足。

出错 yolov3Layer (line 54)
', arc:',arc];

出错 importDarkNetLayers (line 360)
yolov3_layer = yolov3Layer(['yolo_v3_id',num2str(yoloIndex)],...

出错 importDarknetWeights (line 30)
moduleTypeList,moduleInfoList,layerToModuleIndex] = importDarkNetLayers(cfgfile,cutoffModule);

出错 train (line 31)
[lgModel,hyperParams] = importDarknetWeights(cfg_file,weight_file);

My matlab version is 2020a,When I training on my own dataset,this error occured

@acobo
Copy link

acobo commented May 20, 2020

Hello,
I just found the same error, even with the provided examples and the pretrained network.
It seems that the last parameter "arc" is required for the function yolov3layer but it is not passed to it from the script importDarkNetLayers.m
I haven't found what is this parameter for, but tried to send a zero and it works, for the pretrained network and for my own dataset training, and the inference seems pretty good.
just add ",0" in line 360 of utils/importDarkNetLayers.m:

        yolov3_layer = yolov3Layer(['yolo_v3_id',num2str(yoloIndex)],...
            mask,allAnchors,nClasses,yoloIndex,imageSize,0);

Hope that helps while it is fixed by the author.
regards!
Adolfo.

@bozki
Copy link
Author

bozki commented May 20, 2020

Hello,
I just found the same error, even with the provided examples and the pretrained network.
It seems that the last parameter "arc" is required for the function yolov3layer but it is not passed to it from the script importDarkNetLayers.m
I haven't found what is this parameter for, but tried to send a zero and it works, for the pretrained network and for my own dataset training, and the inference seems pretty good.
just add ",0" in line 360 of utils/importDarkNetLayers.m:

        yolov3_layer = yolov3Layer(['yolo_v3_id',num2str(yoloIndex)],...
            mask,allAnchors,nClasses,yoloIndex,imageSize,0);

Hope that helps while it is fixed by the author.
regards!
Adolfo.

thank you. I try it and now the code is working! And I have another question. Have you found the error?
错误使用 importDarknetWeights (line 82)
方差应该大于0!

出错 train (line 31)
[lgModel,hyperParams] = importDarknetWeights(cfg_file,weight_file);
I commented out these sentences and the network is operational.
if any(bn_var<-0.01)
error("方差应该大于0!");
end
This should be no problem?

@acobo
Copy link

acobo commented May 20, 2020 via email

@bozki
Copy link
Author

bozki commented May 20, 2020

No, sorry, no more errors so far. I have no idea what it could be the reason, sorry! De: bozki notifications@github.com Enviado el: miércoles, 20 de mayo de 2020 10:28 Para: cuixing158/yolov3-yolov4-matlab yolov3-yolov4-matlab@noreply.github.com CC: Cobo Garcia, Adolfo adolfo.cobo@unican.es; Comment comment@noreply.github.com Asunto: Re: [cuixing158/yolov3-yolov4-matlab] 您好,请问一下训练的时候出现输入参数不足应该怎么解决? (#9) Hello, I just found the same error, even with the provided examples and the pretrained network. It seems that the last parameter "arc" is required for the function yolov3layer but it is not passed to it from the script importDarkNetLayers.m I haven't found what is this parameter for, but tried to send a zero and it works, for the pretrained network and for my own dataset training, and the inference seems pretty good. just add ",0" in line 360 of utils/importDarkNetLayers.m: yolov3_layer = yolov3Layer(['yolo_v3_id',num2str(yoloIndex)],... mask,allAnchors,nClasses,yoloIndex,imageSize,0); Hope that helps while it is fixed by the author. regards! Adolfo. thank you. I try it and now the code is working! And I have another question. Have you found the error? 错误使用 importDarknetWeights (line 82) 方差应该大于0! 出错 train (line 31) [lgModel,hyperParams] = importDarknetWeights(cfg_file,weight_file); I commented out these sentences and the network is operational. if any(bn_var<-0.01) error("方差应该大于0!"); end This should be no problem? — You are receiving this because you commented. Reply to this email directly, view it on GitHub<#9 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABS7OGSCDD7R3FUQHUKW5KTRSOIBLANCNFSM4NFVE6WA.

It‘s ok. Thank you very much.

@rickymedrano
Copy link

Hello,
I just found the same error, even with the provided examples and the pretrained network.
It seems that the last parameter "arc" is required for the function yolov3layer but it is not passed to it from the script importDarkNetLayers.m
I haven't found what is this parameter for, but tried to send a zero and it works, for the pretrained network and for my own dataset training, and the inference seems pretty good.
just add ",0" in line 360 of utils/importDarkNetLayers.m:

        yolov3_layer = yolov3Layer(['yolo_v3_id',num2str(yoloIndex)],...
            mask,allAnchors,nClasses,yoloIndex,imageSize,0);

Hope that helps while it is fixed by the author.
regards!
Adolfo.

@acobo Once you go the yolo model to import, how were you able to train on a custom dataset with it? In the network analyze it's showing a couple errors about "unconnected output".

@abrunchof
Copy link

Hello,
I just found the same error, even with the provided examples and the pretrained network.
It seems that the last parameter "arc" is required for the function yolov3layer but it is not passed to it from the script importDarkNetLayers.m
I haven't found what is this parameter for, but tried to send a zero and it works, for the pretrained network and for my own dataset training, and the inference seems pretty good.
just add ",0" in line 360 of utils/importDarkNetLayers.m:

        yolov3_layer = yolov3Layer(['yolo_v3_id',num2str(yoloIndex)],...
            mask,allAnchors,nClasses,yoloIndex,imageSize,0);

Hope that helps while it is fixed by the author.
regards!
Adolfo.

thank you. I try it and now the code is working! And I have another question. Have you found the error?
错误使用 importDarknetWeights (line 82)
方差应该大于0!

出错 train (line 31)
[lgModel,hyperParams] = importDarknetWeights(cfg_file,weight_file);
I commented out these sentences and the network is operational.
if any(bn_var<-0.01)
error("方差应该大于0!");
end
This should be no problem?

您好!请问您的这个问题解决了吗?我也遇到了同样的问题

@trandong20
Copy link

Hello, thank you for fixing the error, but another error, do you all have the error?
Error using dlfeval (line 43)
Size of predictions and target values arguments must match.

Error in train (line 119)
[gradients,boxLoss,objLoss,clsLoss,totalLoss,state] = dlfeval(@modelGradients, model, XTrain,
YTrain,yoloLayerNumber);
My matlab version is 2021a,When I training on my own dataset,this error occured
Please help me, i appreciate any help

@yangchengjian-bit
Copy link

我也出现了和您一样的问题,请问您这个问题解决了吗。可否告知一下如何解决呀,麻烦您了!!!
I have the same problem as you, have you solved this problem? Can you tell me how to solve it, please! !

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

6 participants