Neural Network GPU training with output weights fails with "No method 'subsref' "

4 views (last 30 days)
When training a NN I would like to use output weights (between 0 and 1), but I get the following error :
No method 'subsref' with matching signature found for class 'gpuArray'
My function does the following :
% get the gpuDevice
% load data
% change 'tansig' transferFcn to 'elliotsig'
for i=1:net.numLayers
if strcmp(net.layers{i}.transferFcn,'tansig')
net.layers{i}.transferFcn = 'elliotsig';
end
end
% I had to alter processFcns to avoid the following errors :
% Input processing function REMOVECONSTANTROWS is not supported with GPU.
net.input.processFcns = {'mapminmax'};
net.output.processFcns = {'mapminmax'};
% convert data to GPU data with the nndata2gpu function
% Then train
net2 = train(net2, x, t, [], [], wtsOutG);
The error returned is :
No method 'subsref' with matching signature found for class 'gpuArray'
  1 Comment
Aditya Patil
Aditya Patil on 21 Sep 2020
Can you provide a sample code snippet that creates the error? I am unable to reproduce to error with the given code, hence it might be possible that the issue lies in rest of the code.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!