perClass Documentation
version 5.0 (21-sep-2016)
 SDDEEPNET  Deep convolutional network classifier

    [P,RES]=SDDEEPNET(DATA,options)

 INPUTS
   DATA   - Labeled data set

 ARCHITECTURE OPTIONS
   'conv',[B B F K]  - convolution with K kernels (BxBxF size)
       - optionally possible to specify step S with 'conv',[B B F K S]
   'bnorm'
   'mpool',B - max pooling with block size B and optional step S ('mpool',[B S])
   'relu' - rectified linear unit
   'dropout',R - dropout with rate R (default: 0.5)

 LEARNING OPTIONS
   'nogui' - do not show GUI with training progress, output on console
   'rate',R - learning rate (default: 0.001)
   'batch',BS - batch size (default 500)
   'epochs',E - number of epochs (default: 100)
   'init',PN - initialize from trained deep network pipeline PN
   'val',VAL - provide set used for validation (DATA is then used only for training
               and no internal splitting takes place
   'arch',A - architecture may be specified in cell array A using options above
              ...,'arch',{'conv',[5 5 1 10],'mpool',[2 2],...}
   'stop at',E - stop at reaching error E (default: 0.0). If empty, run all epochs.

 OUTPUTS
    P - trained deep network
    RES - result structure
      Etr,Ets - training set and valudation set errors for each epoch
      best, bestiter, besterr - model with lowest error on val set (with iter and val.err)
      last, lastiter, lasterr - last model

 DESCRIPTION
 SDDEEPNET trains a deep convolutional network. The network architecture
 needs to be defined using options specified in ARCHITECTURE
 section. Then, the number of epochs needs to be specified to initiate
 training. With 'gui' option a figure will open showing the progress and
 validation error reached. Solution with the best validation set error is
 returned. The split of DATA into training and validation subsets is
 performed internally. Custom validation subset may be provided with 'val'
 option. In that case, DATA is used only for training the model and no
 internal splitting takes place.  Once trained, the network P may be used
 to initialize further training with 'init' option.