anchor.diff:                :layer-index layer-index
                 :layer-type
                 (cond ((zerop layer-index) :input)
  -                    ((= layer-index (1- (length (topology net)))) :output)
  +                    ((= layer-index output-layer-index) :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))
  +              :transfer-tag 
  +              (if (= layer-index (1- (length (topology net))))
  +                  :none
  +                  (transfer-tag net))
                 :net net)))
     (loop for layer in (layers net)
        for next-layer = (if (eql (layer-type layer) :output)
  
positive.code:   (* output (- 1 output)))
  
  (defun relu (x)
    (max 0.0001 x))
  
  (defun relu-derivative (x)
    (if (> x 0.0) 1.0 0.0001))
  
  (defun transfer-functions (name function-or-derivative)
    (ds-get (ds `(:map :bound-logistic
  
negative.code: (defmethod get-neuron ((net t-net) (layer-index integer) (neuron-index integer))
    (elt (neuron-array (elt (layers net) layer-index)) neuron-index))
  
  (defun set-layer-transfer-function (net layer-index transfer-tag)
    (loop for neuron across (neuron-array (elt (layers net) layer-index))
       do (setf (transfer-tag neuron) transfer-tag)
         (setf (transfer-function neuron)
               (transfer-functions transfer-tag :function))
         (setf (transfer-derivative neuron)
               (transfer-functions transfer-tag :derivative))))
  
  (defun set-network-transfer-function (net transfer-tag)
    (loop for layer in (layers net) do
         (set-layer-transfer-function net (layer-index layer) transfer-tag)))
  
  (defmethod transfer ((neuron t-neuron))
    (setf (output neuron)
          (funcall (transfer-function neuron) (input neuron)))
  