Output processing function REMOVECONSTANTROWS is not supported with GPU.
Mostrar comentarios más antiguos
Hello,
I am following MATLAB tutorial on neural networks with GPU parallelization and I am not able to use my own data to start the training process, only the example data set works. The code is this:
%[xa,ta] = house_dataset;
[X_Train,Y_Train,T_Train] = loadData({'Data2008.mat'}, 0);
% Year to be predicted
[X_PredYear,Y_PredYear,T_PredYear] = loadData('Data2009.mat', 0);
xg = nndata2gpu(X_Train);
tg = nndata2gpu(Y_Train);
net1 = feedforwardnet(10);
net2 = configure(net1,X_Train,Y_Train); % Configure with MATLAB arrays
net2 = train(net2,xg,tg); % Execute on GPU with NNET formatted gpuArrays
yg = net2(xg); % Execute on GPU
y = gpu2nndata(yg); % Transfer array to local workspace
When I use the house data_set, everything works fine. However, when I load my data from the .mat file (X_Train and Y_Train are columns extracted from a table, so they are basically 2D arrays), I get the error "Output processing function REMOVECONSTANTROWS is not supported with GPU." in the line:
net2 = train(net2,xg,tg);
As if this extra functionality "REMOVECONSTANTROWS" was added to the arrays for some reason. I actually tried a "dumb" approach to copy each element from X_Train and Y_Train to double arrays and pass in the5se arrays to the function nndata2gpu but the error persists. Could anyone tell what is preventing me to use my input data in this code?
Thank you.
Respuesta aceptada
Más respuestas (1)
Remington Reid
el 10 de Sept. de 2019
0 votos
I ran into the same issue but required a slightly different solution. I was training a 2 layer feedforward net that produces a single output. The input training data dimensions were 6 x N and the output training dimensions were 1 x N. The output data was definitely not constant. I tried filtering repeated values in the output to be safe with no luck. Both input and output were classed as 'double'. Disabling the REMOVECONSTANTROWS option worked but I had to disable it both on the input and on the output.
net.input.processFcns = {'mapminmax'};
net.output.processFcns = {'mapminmax'};
In my case network training and performance did not seem to suffer, but since there were no constant rows I suppose that isn't to surprising. Thank you for the instructions to disable the option!
Categorías
Más información sobre Parallel and Cloud en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!