about summary refs log tree commit diff
path: root/sourcecodes/bnt-master/netlab3.3/glmpak.m
diff options
context:
space:
mode:
Diffstat (limited to 'sourcecodes/bnt-master/netlab3.3/glmpak.m')
-rw-r--r--sourcecodes/bnt-master/netlab3.3/glmpak.m20
1 files changed, 20 insertions, 0 deletions
diff --git a/sourcecodes/bnt-master/netlab3.3/glmpak.m b/sourcecodes/bnt-master/netlab3.3/glmpak.m
new file mode 100644
index 00000000..300960fc
--- /dev/null
+++ b/sourcecodes/bnt-master/netlab3.3/glmpak.m
@@ -0,0 +1,20 @@
+function w = glmpak(net)
+%GLMPAK	Combines weights and biases into one weights vector.
+%
+%	Description
+%	W = GLMPAK(NET) takes a network data structure NET and  combines them
+%	into a single row vector W.
+%
+%	See also
+%	GLM, GLMUNPAK, GLMFWD, GLMERR, GLMGRAD
+%
+
+%	Copyright (c) Ian T Nabney (1996-2001)
+
+errstring = consist(net, 'glm');
+if ~errstring
+  error(errstring);
+end
+
+w = [net.w1(:)', net.b1];
+