anchor.diff:                      ((= layer-index (1- (length (topology net)))) :output)
                       (t :hidden))
                 :neuron-count (elt (topology net) layer-index)
  -              :transfer-tag (transfer-tag net)
  +              :transfer-tag
  +              (if (or (zerop layer-index)
  +                      (= 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)
  
positive.code: (defun logistic-derivative (output)
    (* output (- 1 output)))
  
  (defun relu (input)
    (max 0 input))
  
  (defun relu-derivative (output)
    (if (> output 0.0) 1.0 0.01))
  
  (defun transfer-functions (name function-or-derivative)
    (ds-get (ds `(:map :bound-logistic
  
negative.code: (defun evaluate-training (net test-set)
    (let ((total 0.0)
          (correct 0.0))
      (loop for (inputs outputs) in test-set
         while inputs do
           (incf total)
           (let ((targets (feed net inputs)))
             (when (loop for output across outputs
                      for target across targets
                      always (or (and (>= target 0.5) (>= output 0.5))
                                 (and (< target 0.5) (< output 0.5))))
  