invscale_snn.m

来自「神经网络的工具箱, 神经网络的工具箱,」· M 代码 · 共 44 行

M
44
字号
function x = invscale_snn(y, sc)%INVSCALE_SNN  inverse of scaling function.%% Syntax%%  x = invscale_snn(y, sc)%% Description%%  INVSCALE_SNN takes%    y   -  [N x M] matrix of scaled values.%    sc  -  [N x 1] cell of [1 x Ln] arrays of sc_structs%        or [1 x L] array of sc_structs containing scaling%        information.%  and returns%    x   -  [N x M] matrix with scaling reversed. %%   (N, M, L = integer; Ln = integer with 0 < n < N)%% See also%%   SCALE_SNN%if iscell(sc)   if (size(y, 1) ~= size(sc, 1))      error('INVSCALE_SNN: dimension 1 of input arguments must be the same')   else      x = y;      for k = 1:size(y, 1)          for i = prod(size(sc{k})):-1:1              x(k,:) = feval(sc{k}(i).name, x(k,:), sc{k}(i).parameters, 'inv');          end      end    endelse   x = y;   for i = prod(size(sc)):-1:1       x = feval(sc(i).name, x, sc(i).parameters, 'inv');   endend

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?