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

你好,我在训练的时候遇到了这个问题:错误使用 dlfeval函数,Error using dlfeval #21

Open
MikeMegamind opened this issue May 17, 2021 · 4 comments

Comments

@MikeMegamind
Copy link

我建立了自己的数据集进行训练,在训练的那部分,这个函数出现了问题:
I set up my own data set for training, and in the training part, this function has a problem:

[gradients,loss,state] = dlfeval(@modelGradients, model, XTrain, YTrain,yoloLayerNumber);

出错原因显示的是:
The error is shown here:

Error using dlfeval (line 43)
Size of predictions and target values arguments must match.

我单步调试之后发现问题出在 dlfeval函数的这里:
After I step through it, I found the problem is at the dlfeval function:

try
[varargout{1:nout}] = deep.internal.dlfeval(fun,varargin{:});
catch err
nnet.internal.cnn.util.rethrowDLExceptions(err);
end

这部分代码的[varargout{1:nout}] = deep.internal.dlfeval(fun,varargin{:})无法执行,导致报错。
但是我并不知道为什么出错,也不知道怎么解决。请帮帮我。
[varargout{1:nout}] = deep.internal.dlfeval(fun,varargin{:})unable to run, resulting in an error.
I don't know why it went wrong or how to solve it.Please help me.

@KobeZ0121
Copy link

楼主您好,请问这个问题解决了吗,我也遇到相同错误了

@MikeMegamind
Copy link
Author

抱歉,时间过去的太久了,我已经忘了当时是怎么解决的了…

@MikeMegamind
Copy link
Author

MikeMegamind commented Apr 25, 2022 via email

@yangchengjian-bit
Copy link

楼主您好,请问这个问题解决了吗,我也遇到相同错误了
请问你解决这个问题了吗,我这边报错是这样的

错误使用 dlfeval (第 44 行)
预测参数和目标值参数的大小必须匹配。

出错 train (第 120 行)
[gradients,boxLoss,objLoss,clsLoss,totalLoss,state] = dlfeval(@modelGradients, model, XTrain, YTrain,yoloLayerNumber);

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

3 participants