    (max-pooling kernel-dim kernel-dim pad pad stride stride)))
 
 
+(defn split
+  [branches]
+  [{:type :split :branches branches}])
+
+
 (def example-mnist-description
   [(input 28 28 1)
    (convolutional 5 0 1 20)

  cortex.impl.layers.Softmax
  (layer->input [layer] (input (m/ecount (:output layer))))
  (layer->description [layer] (softmax))
  cortex.impl.layers.Softmax
  (layer->input [layer] (input (m/ecount (:output layer))))
  (layer->description [layer] (dropout (:probability layer)))
  cortex.impl.layers.Linear
  (layer->input [layer] (input (m/column-count (:weights layer))))
  (layer->description [layer] (linear (m/row-count (:weights layer)) :weights (m/clone (:weights layer)) :bias (m/clone (:bias layer))))
  cortex.impl.layers.convolution.Convolutional
  (layer->input [layer] (conv-config->input (:conv-config layer)))
  (layer->description [layer] (conv-config->description (:conv-config layer) :convolutional (:weights layer) (:bias layer)))
  cortex.impl.layers.convolution.Pooling
  (layer->input [layer] (conv-config->input (:conv-config layer)))
  (layer->description [layer] (conv-config->description (:conv-config layer) :max-pooling))

(defmulti build-desc (fn [result item]
                       (:type item)))

(defn recurse-build-desc
  [initial-item desc-seq]
  (reduce (fn [accum item]
            (let [previous (last accum)]
              (conj accum (build-desc previous item))))
          [initial-item]
          desc-seq))

(defmethod build-desc :input
  [previous item]
  item)
