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

조회 수: 2(최근 30일)
Matt Flax
Matt Flax 2020년 8월 19일
댓글: Aditya Patil 2020년 9월 21일
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
Aditya Patil
Aditya Patil 2020년 9월 21일
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.

댓글을 달려면 로그인하십시오.

답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by