anchor.diff:                                   :learning-rate (flt 1)
                                    :learning-rate-decay (flt 0.998)
                                    :l2-upper-bound nil
  +                                 :set-dropout-p t
                                    :rescale-on-dropout-p t)
                (unless quick-run-p
                  (save-weights bpn-filename bpn)))
  
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 :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 '(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* '(f2)))))
  
  
negative.code:                        (set-dropout-and-rescale-activation-weights
                          lump (flt 0.2) bpn)
                         (setf (slot-value lump 'dropout) (flt 0.2)))))
             (lumps bpn)))
      (unless (zerop n-epochs)
        (mgl-example-util:log-msg "Starting to train the whole BPN~%")
        (train (make-sampler training :n-epochs n-epochs)
               (make-instance 'mnist-bpn-gd-trainer
                              :training training
                              :test test
                              :segmenter (make-segmenter #'make-trainer))
               (make-instance 'bp-learner :bpn bpn)))))
  
  (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 :dropout (flt 0.2)))
      (f1-activations (add-activations :name 'f1 :inputs '(inputs)
                                       :size n-units-1))
      (f1* (->rectified :x f1-activations))
      (f1 (->dropout :x f1* :dropout (flt 0.5)))
      (f2-activations (add-activations :name 'f2 :inputs '(f1) :size n-units-2))
      (f2* (->rectified :x f2-activations))
      (f2 (->dropout :x f2* :dropout (flt 0.5)))
      (f3-activations (add-activations :name 'f3 :inputs '(f2) :size n-units-3))
      (f3* (->rectified :x f3-activations))
      (f3 (->dropout :x f3* :dropout (flt 0.5)))
      (predictions (tack-cross-entropy-softmax-error-on
                    mgl-bp::*bpn-being-built* (list f3)))))
  
  