How could I cancel pre-processing and post-processing stages when training a neural network?

Whenever I use fitnet it applies minmax to my data by default, however my data is already scaled, so I was just wondering if there was a way to change this default feature.

 Réponse acceptée

To remove mapminmax as a processFcn but still keep removeconstantrows
close all, clear all, clc
% WITH DEFAULT MAPMINMAX
[x,t] = simplefit_dataset;
net = fitnet;
rng(0)
[net tr y e ] = train(net,x,t);
NMSE1 = mse(e)/mean(var(t',1)) % 1.7558e-05
% WITHOUT DEFAULT MAPMINMAX
[x,t] = simplefit_dataset;
net = fitnet;
net.inputs{1}.processFcns={'removeconstantrows'};
net.outputs{2}.processFcns={'removeconstantrows'};
rng(0)
[net tr y e ] = train(net,x,t);
NMSE2 = mse(e)/mean(var(t',1)) % 1.7241e-05
Hope this helps.
Thank you for formally accepting my answer
Greg

2 commentaires

Thank you so much for you response, I was just wondering if this cancels post-processing as well. Also could I remove 'remove const rows'? So have no processing features whatsoever?
Yes. The first statement is for inputs and the second for outputs.
If you do not want to eliminate constant rows, use '' for the RHS (maybe {} will work also)
Hope this helps.
Greg

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Deep Learning Toolbox dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by