comparison toolboxes/FullBNT-1.0.7/nethelp3.3/consist.htm @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:cc4b1211e677
1 <html>
2 <head>
3 <title>
4 Netlab Reference Manual consist
5 </title>
6 </head>
7 <body>
8 <H1> consist
9 </H1>
10 <h2>
11 Purpose
12 </h2>
13 Check that arguments are consistent.
14
15 <p><h2>
16 Synopsis
17 </h2>
18 <PRE>
19 errstring = consist(net, type, inputs, outputs)
20 errstring = consist(net, type, inputs)
21 errstring = consist(net, type)
22 </PRE>
23
24
25 <p><h2>
26 Description
27 </h2>
28
29 <p><CODE>errstring = consist(net, type, inputs)</CODE> takes a network
30 data structure <CODE>net</CODE> together with a string <CODE>type</CODE> containing
31 the correct network type, a matrix <CODE>inputs</CODE> of input vectors and checks
32 that the data structure is consistent with the other arguments. An empty
33 string is returned if there is no error, otherwise the string contains the
34 relevant error message. If the <CODE>type</CODE> string is empty, then any
35 type of network is allowed.
36
37 <p><CODE>errstring = consist(net, type)</CODE> takes a network data structure
38 <CODE>net</CODE> together with a string <CODE>type</CODE> containing the correct
39 network type, and checks that the two types match.
40
41 <p><CODE>errstring = consist(net, type, inputs, outputs)</CODE> also checks that the
42 network has the correct number of outputs, and that the number of patterns
43 in the <CODE>inputs</CODE> and <CODE>outputs</CODE> is the same. The fields in <CODE>net</CODE>
44 that are used are
45 <PRE>
46 type
47 nin
48 nout
49 </PRE>
50
51
52 <p><h2>
53 Example
54 </h2>
55
56 <p><CODE>mlpfwd</CODE>, the function that propagates values forward through an MLP
57 network, has the following check at the head of the file:
58 <PRE>
59
60 errstring = consist(net, 'mlp', x, t);
61 if ~isempty(errstring)
62 error(errstring)
63 end
64 </PRE>
65
66
67 <p><h2>
68 See Also
69 </h2>
70 <CODE><a href="mlpfwd.htm">mlpfwd</a></CODE><hr>
71 <b>Pages:</b>
72 <a href="index.htm">Index</a>
73 <hr>
74 <p>Copyright (c) Ian T Nabney (1996-9)
75
76
77 </body>
78 </html>