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

GPUArray get error #15

Open
willy90806k opened this issue Mar 11, 2021 · 3 comments
Open

GPUArray get error #15

willy90806k opened this issue Mar 11, 2021 · 3 comments

Comments

@willy90806k
Copy link

Hi.
When I'm training yolov4-tiny and setting my executionEnvironment setting is 'gpu', Matlab will print:

Error using gpuArray/subsasgn
When assigning into a GPUArray, the subscripts must contain unique values.Subscript 2 contained repeated values.

Error in dlarray/parenAssign (line 53)
objdata(argsNonDlarray{:}) = rhsdata;

Error in train>modelGradients (line 229)
tcls_(idx,tcls+1) = 1.0;% 确保类别标签是从0开始标注的索引,否则这里会超出维度

Error in deep.internal.dlfeval (line 18)
[varargout{1:nout}] = fun(x{:});

Error in dlfeval (line 41)
[varargout{1:nout}] = deep.internal.dlfeval(fun,varargin{:});

Error in train (line 121)
[gradients,boxLoss,objLoss,clsLoss,totalLoss,state] =
dlfeval(@modelGradients, model, XTrain, YTrain,yoloLayerNumber);

But if I change executionEnvironment to 'cpu' ,it can successfully do training.
Can you give me some clues about what happened?

Thank for help.

@Hind-colla
Copy link

Hi.
When I'm training yolov4-tiny and setting my executionEnvironment setting is 'gpu', Matlab will print:

Error using gpuArray/subsasgn
When assigning into a GPUArray, the subscripts must contain unique values.Subscript 2 contained repeated values.
Error in dlarray/parenAssign (line 53)
objdata(argsNonDlarray{:}) = rhsdata;
Error in train>modelGradients (line 229)
tcls_(idx,tcls+1) = 1.0;% 确保类别标签是从0开始标注的索引,否则这里会超出维度
Error in deep.internal.dlfeval (line 18)
[varargout{1:nout}] = fun(x{:});
Error in dlfeval (line 41)
[varargout{1:nout}] = deep.internal.dlfeval(fun,varargin{:});
Error in train (line 121)
[gradients,boxLoss,objLoss,clsLoss,totalLoss,state] =
dlfeval(@modelGradients, model, XTrain, YTrain,yoloLayerNumber);

But if I change executionEnvironment to 'cpu' ,it can successfully do training.
Can you give me some clues about what happened?

Thank for help.

Hello, please i have the same issue have you solve it?

@Hind-colla
Copy link

And how did you change executionEnvironment to 'cpu'? Did you delete those lines?
if (executionEnvironment == "auto" && canUseGPU) || executionEnvironment == "gpu"
XTrain = gpuArray(XTrain);
end
I can't use GPU, so i have deleted those lines but It's not working for me. I get these error : 'modelGradients' is used in Generate Synthetic Signals Using Conditional Generative Adversarial Network.

Error in deep.internal.dlfeval (line 18)
[varargout{1:nout}] = fun(x{:});

Error in dlfeval (line 41)
[varargout{1:nout}] = deep.internal.dlfeval(fun,varargin{:});

Error in nouveux (line 94)
[gradients,boxLoss,objLoss,clsLoss,totalLoss,state] = dlfeval(@modelGradients, model, XTrain,
YTrain,yoloLayerNumber);

What did you do please?

@MikeMegamind
Copy link

Hi, I have the same error. Could you please tell us how to change executionEnvironment to 'cpu' ? Thanks a lot.

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