 
 (def config
   {:input-size      784
-   :hidden-size     400
-   :classifier-size 400
-   :noise-pct       0.3
-   :sparsity-weight 0.3
-   :sparsity-target 0.1
-   :encoder-activation Ops/LOGISTIC
-   :decoder-activation Ops/LOGISTIC
-   :learning-rate 0.001
+   :hidden-size     1000
+   :classifier-size 200
+   :noise-pct       0.2
+   :dropout         0.3
+   :sparsity-weight 0.2
+   :sparsity-target 0.05
+   :encoder-activation Ops/TANH
+   :decoder-activation Ops/TANH
+   :learning-rate 0.0005
 
    :classes       MNIST-CLASSES
    :train-data    MNIST-DATA



(defn encoder
  [{:keys [input-size hidden-size encoder-activation sparsity-weight sparsity-target] :as config}]
  (stack
    ;;(offset :length input-size :delta -0.5)
    (neural-network :inputs input-size
                    :outputs hidden-size
                    :layers 1
                    ;; :max-weight-length 4.0
                    :output-op encoder-activation)
                    ;; :dropout 0.5)
    (sparsifier :length hidden-size :weight sparsity-weight)))



   :test-data     MNIST-TEST-DATA
   :test-labels   MNIST-TEST-LABELS

   :ae-train-secs (* 60 10)
   :mlp-train-secs (* 60 10)
   :n-reconstructions 100
   })

(def ex (atom nil))
