anchor.diff:  ;;;;
   ;;;;   "Deep Boltzmann Machines",
   ;;;;   http://www.cs.toronto.edu/~hinton/absps/dbm.pdf
  +;;;;
  +;;;; For dropout:
  +;;;;
  +;;;;   "Improving neural networks by preventing co-adaptation of
  +;;;;   feature detectors"
  +;;;;   http://arxiv.org/pdf/1207.0580.pdf
  +;;;;
  +;;;; Maxout:
  +;;;;
  +;;;;  "Maxout Networks"
  +;;;;  http://arxiv.org/abs/1302.4389
   ;;;;
   ;;;; Download the four files from http://yann.lecun.com/exdb/mnist and
   ;;;; gunzip them. Set *MNIST-DATA-DIR* to point to their directory and
  
positive.code: (defun build-maxout-mnist-bpn (&key (n-units-1 1200) (n-units-2 1200)
                                 (group-size 5))
    (build-bpn (:class 'mnist-bpn :max-n-stripes 100)
      (inputs (->input :name 'inputs :size 784))
      (f1-activations (add-activations :name 'f1 :inputs '(inputs)
                                       :size n-units-1))
      (f1* (->max :x f1-activations :group-size group-size))
      (f1 (->dropout :x f1*))
      (f2-activations (add-activations :name 'f2 :inputs (list f1)
                                       :size n-units-2))
      (f2* (->max :x f2-activations :group-size group-size))
      (f2 (->dropout :x f2*))
      (predictions (tack-cross-entropy-softmax-error-on
                    mgl-bp::*bpn-being-built* (list f2)))))
  
  (defun train-mnist/4 (&key training test quick-run-p bpn-var bpn-filename)
    (with-experiment ()
  
negative.code: (defun build-rectified-mnist-bpn (&key (n-units-1 1200) (n-units-2 1200)
                                    (n-units-3 1200))
    (build-bpn (:class 'mnist-bpn :max-n-stripes 100)
      (inputs (->input :size 784))
      (f1-activations (add-activations :name 'f1 :inputs '(inputs)
                                       :size n-units-1))
      (f1* (->rectified :x f1-activations))
      (f1 (->dropout :x f1*))
      (f2-activations (add-activations :name 'f2 :inputs '(f1) :size n-units-2))
      (f2* (->rectified :x f2-activations))
      (f2 (->dropout :x f2*))
      (f3-activations (add-activations :name 'f3 :inputs '(f2) :size n-units-3))
      (f3* (->rectified :x f3-activations))
      (f3 (->dropout :x f3*))
      (predictions (tack-cross-entropy-softmax-error-on
  