anchor.diff:    (* output (- 1 output)))
   
   (defun relu (x)
  -  (max 0.0001 x))
  +  (max 0.0 x))
   
   (defun relu-derivative (x)
  -  (if (> x 0.0) 1.0 0.0001))
  +  (if (>= x 0.0) 1.0 0.0))
  +
  +(defun tanh-derivative (x) (- 1 (* x x)))
  +
  +(defun identity-derivative (x)
  +  (declare (ignore x))
  +  1)
  +
  +(defun no-activation (x) x)
  +
  +(defun no-activation-derivative (x) x)
   
   (defun transfer-functions (name function-or-derivative)
     (ds-get (ds `(:map :bound-logistic
  
positive.code:               :layer-index layer-index
                :layer-type
                (cond ((zerop layer-index) :input)
                      ((= layer-index (1- (length (topology net)))) :output)
                      (t :hidden))
                :neuron-count (elt (topology net) layer-index)
                :transfer-tag (transfer-tag net)
                ;; (if (= layer-index (1- (length (topology net))))
                ;;     :logistic
                ;;     (transfer-tag net))
                :net net)))
    (loop for layer in (layers net)
       for next-layer = (if (eql (layer-type layer) :output)
  
negative.code: 
  (defmethod initialize-instance :after ((net t-net) &key)
    (setf (layers net)
          (loop with output-layer-index = (1- (length (topology net)))
             for layer-spec in (topology net)
             for layer-index = 0 then (1+ layer-index)
             collect
               (make-instance
  