NET-SPEC:  Create a new network, or display specifications for existing net.

Net-spec creates a log file containing records describing the network
architecture and the associated priors.  When invoked with just a log
file as argument, it displays the specifications of the network stored
in that log file.


    net-spec log-file N-inputs { N-hidden { flag } } N-outputs { flag }
             / ti [ ih bh th { hh ih bh th } ] { ho } io bo  [ / { ah } ao ] 

    net-spec log-file

N-inputs and N-outputs are the numbers of units in the input and
output layers.  The sizes of zero or more hidden layers are specified
between these.  Flags pertaining to a layer may be specified after the
argument giving the size of the layer.  

The following flag is supported for hidden layers and the output


This specifies that connections from certain inputs are to be omitted
from those feeding into this layer (assuming that any inputs at all
are looked at, as specifed by later arguments).  If the "-" is placed
before the list of inputs, the list gives the inputs that are NOT
omitted.  Inputs are numbered starting with 1.

For hidden layers, the activation function to use may be specified
using one of the following flags:

    tanh identity sin

The default is tanh, the hyperbolic tangent function.  The identity
flag causes the output of a hidden unit in the layer to be identical
its summed input.  The sin flag specifies that the activation function
to be h(u) = sqrt(2)*sin(sqrt(2)*u).  The multiplications by sqrt(2)
in this activation function make a network with one hidden layer of
this type correspond in the limit of many hidden units to a Gaussian
process model with covariance function given by exp(-distance^2).

Following a "/", the priors for groups of weights, biases, and offsets
are specified.  "ti" is the prior for the offsets of input units, "hh"
the prior for hidden-hidden weights, "ih" the prior for input-hidden
weights, "bh" the prior for hidden biases, "th" the prior for hidden
unit offsets, "ho" the prior for weights from a hidden layer to the
outputs, "io" the prior for input-output weights, and "bo" the prior
for output biases.  The order of priors relating to hidden layers is
from the first layer to the last (the last being the one closest to
the output layer).  All the priors relating to a network with the
given number of hidden layers must be present, except that some or all
of the hidden-output priors may be omitted.  The order of "ho" priors
is last to first; if not all are present, it is the priors for
connections from the earlier layers that are absent.

For the syntax of a prior specification, see prior.doc.  If "-" is
given instead of a prior specification (or, for "ho" priors, if they
are omitted entirely), the parameters in question do not exist at all,
which is equivalent to their being zero.

The alpha values that specify the prior for the "adjustments" to the
distributions of weights and biases going into a given unit are
specified following these priors.  A value of "-" corresponds to
infinity (effectively eliminating the adjustment).  The entire set of
adjustments may be omitted, eliminating them all.

Note that a data model will also have to be specified (with model-spec)
if any learning is to be done.  

Two records are written to the newly created log file - one with type
'A' with a net_arch structure as data, and one with type 'P' with a
net_priors structure as data.  A record of type 'F' will be written as
well if any flags were specified.  These records have an index of -1.
When the second form of the command is used (with just the log file as
argument), these records are read and the information they contain is
displayed on standard output.

            Copyright (c) 1995-2003 by Radford M. Neal