我正在使用Matlab的神经网络工具箱,并且已经使用genFunction生成了神经网络函数。

我想知道mapminmax_apply函数的作用,这些变量的用途以及它们在神经网络中的含义:

% Input 1
x1_step1_xoffset = [0.151979470539401;-89.4008362047824;0.387909026651698;0.201508462422352];
x1_step1_gain = [2.67439342164766;0.0112020512930696;3.56055585104964;4.09080417195814];
x1_step1_ymin = -1;


这是mapminmax_apply函数:

% Map Minimum and Maximum Input Processing Function
function y = mapminmax_apply(x,settings_gain,settings_xoffset,settings_ymin)
    y = bsxfun(@minus,x,settings_xoffset);
    y = bsxfun(@times,y,settings_gain);
    y = bsxfun(@plus,y,settings_ymin);
end


这是使用上述变量的函数的调用:

% Input 1
Xp1 = mapminmax_apply(X{1,ts},x1_step1_gain,x1_step1_xoffset,x1_step1_ymin);

最佳答案

我认为:

mapminmax函数还可以返回其使用的设置(以及其他设置,偏移,增益和ymin)。出于某种原因,在NN函数吐出的代码中,这些设置在文件的开头,Input1下以x1_step1_xoffset等形式给出。

mapminmax('apply',X,PS)会将PS中的设置应用于mapminmax算法。

因此,我认为此处生成的代码具有比您必需的步骤更多的步骤。您可以摆脱Input1步骤,而只需使用简单的xp1 = mapminmax(x1'),而不是mapminmax_apply

干杯

关于networking - Matlab中genFunction生成的神经网络中的x1_step1_xoffset,x1_step1_gain和x1_step1_ymin是什么?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/25117441/

10-13 00:06