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

📄 try_pruning_hidden_neuron.m

📁 非线型因素分析matlab仿真程序包
💻 M
字号:
function [net, params] = try_pruning_hidden_neuron(data, s, net0, params0, ind, status, diff)% TRY_PRUNING_HIDDEN_NEURON  Try pruning the given hidden neuron%%     This function is easier to use through PRUNE_EVERYTHING.% Copyright (C) 1999-2004 Antti Honkela, Harri Valpola,% and Xavier Giannakopoulos.%% 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.I = setdiff(1:size(net0.w1, 1), ind);net = net0;net.w1 = net.w1(I, :);net.b1 = net.b1(I, :);net.w2 = net.w2(:, I);params = params0;params.net.w2var = params.net.w2var(:, I);fs_tmp = feedfw(s, net, status.approximation);c1 = kl_batch(fs_tmp{4}, s, data, params) + kl_static(net, params);fs_tmp = feedfw(s, net0, status.approximation);c0 = kl_batch(fs_tmp{4}, s, data, params0) + kl_static(net0, params0);fprintf('Try pruning hidden neuron %d: oldc=%f, newc=%f\n', ind, c0, c1);if (c1 - c0 < diff),  fprintf('Pruning hidden neuron %d...\n', ind);else  net = net0;  params = params0;end

⌨️ 快捷键说明

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