Daniel@0: Daniel@0: Daniel@0: Daniel@0: Netlab Reference Manual consist Daniel@0: Daniel@0: Daniel@0: Daniel@0:

consist Daniel@0:

Daniel@0:

Daniel@0: Purpose Daniel@0:

Daniel@0: Check that arguments are consistent. Daniel@0: Daniel@0:

Daniel@0: Synopsis Daniel@0:

Daniel@0:
Daniel@0: errstring = consist(net, type, inputs, outputs)
Daniel@0: errstring = consist(net, type, inputs)
Daniel@0: errstring = consist(net, type)
Daniel@0: 
Daniel@0: Daniel@0: Daniel@0:

Daniel@0: Description Daniel@0:

Daniel@0: Daniel@0:

errstring = consist(net, type, inputs) takes a network Daniel@0: data structure net together with a string type containing Daniel@0: the correct network type, a matrix inputs of input vectors and checks Daniel@0: that the data structure is consistent with the other arguments. An empty Daniel@0: string is returned if there is no error, otherwise the string contains the Daniel@0: relevant error message. If the type string is empty, then any Daniel@0: type of network is allowed. Daniel@0: Daniel@0:

errstring = consist(net, type) takes a network data structure Daniel@0: net together with a string type containing the correct Daniel@0: network type, and checks that the two types match. Daniel@0: Daniel@0:

errstring = consist(net, type, inputs, outputs) also checks that the Daniel@0: network has the correct number of outputs, and that the number of patterns Daniel@0: in the inputs and outputs is the same. The fields in net Daniel@0: that are used are Daniel@0:

Daniel@0:   type
Daniel@0:   nin
Daniel@0:   nout
Daniel@0: 
Daniel@0: Daniel@0: Daniel@0:

Daniel@0: Example Daniel@0:

Daniel@0: Daniel@0:

mlpfwd, the function that propagates values forward through an MLP Daniel@0: network, has the following check at the head of the file: Daniel@0:

Daniel@0: 
Daniel@0: errstring = consist(net, 'mlp', x, t);
Daniel@0: if ~isempty(errstring)
Daniel@0:   error(errstring)
Daniel@0: end
Daniel@0: 
Daniel@0: Daniel@0: Daniel@0:

Daniel@0: See Also Daniel@0:

Daniel@0: mlpfwd
Daniel@0: Pages: Daniel@0: Index Daniel@0:
Daniel@0:

Copyright (c) Ian T Nabney (1996-9) Daniel@0: Daniel@0: Daniel@0: Daniel@0: