⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 createnet_alpha.m

📁 Nonlinear dynamical factor analysis Matlab package
💻 M
字号:
function net = createnet_alpha(n_in, n_hid, n_out, nonlin, ...			 w1std, b1std, w2std, b2std, malpha, valpha)% CREATENET_ALPHA  Create an MLP network with one hidden layer and alphas%                  for all variables%%    Usage:%      net = createnet(n_in, n_hid, n_out, nonlin,%                      w1std, b1std, w2std, b2std, malpha, valpha)%%      where idim, hdim and odim are numbers of input, hidden%      and output neurons, respectively.  Nonlin specifies the%      name of activation function for the hidden layer (default: tanh).%      The network is initialized randomly and -std parameters%      specify standard deviations for all values (defaults: 2,4,1,1).%      Malpha and valpha specify initial values for mean and variance%      alphas, respectively.% Copyright (C) 2002 Harri Valpola and Antti Honkela.%% This package comes with ABSOLUTELY NO WARRANTY; for details% see License.txt in the program package.  This is free software,% and you are welcome to redistribute it under certain conditions;% see License.txt for details.if nargin < 5  w1std = 2;  b1std = 4;  w2std = 1;  b2std = 1;endif nargin < 9  malpha = .1;  valpha = .1;endvarcoef = .001;net.w1 = probdist_alpha(w1std * randn(n_hid, n_in), ...			varcoef * ones(n_hid, n_in), ...			malpha * ones(n_hid, n_in), ...			valpha * ones(n_hid, n_in));net.b1 = probdist_alpha(b1std * randn(n_hid, 1), ...			varcoef * ones(n_hid, 1), ...			malpha * ones(n_hid, 1), ...			valpha * ones(n_hid, 1));net.w2 = probdist_alpha(w2std * randn(n_out, n_hid), ...			varcoef * ones(n_out, n_hid), ...			malpha * ones(n_out, n_hid), ...			valpha * ones(n_out, n_hid));net.b2 = probdist_alpha(b2std * randn(n_out, 1), ...			varcoef * ones(n_out, 1), ...			malpha * ones(n_out, 1), ...			valpha * ones(n_out, 1));if nargin > 3  net.nonlin = nonlin;else  net.nonlin = 'tanh';end

⌨️ 快捷键说明

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