perClass Documentation
version 5.1 (11-May-2017)
 SDDEEPNET  Deep convolutional network classifier


    OUT=SDDEEPNET(DATA,'apply',P)  % apply model to data

   DATA   - Labeled data set

   'matconvnet',P - provide path P to Matconvnet toolbox ('matconvnet'
                    directory expected under the directory P)

   'conv',[B B F K]  - convolution with K kernels (BxBxF size)
       - optionally possible to specify step S with 'conv',[B B F K S]
   '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)

   '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.

    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

 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.