                       (double-array (vec (repeat (reduce * input-shape) 1.0))))
           input (to-core-matrix file-data input-shape)
           layer-outputs (->> (layer-output->ordered-data (:layer_outputs file-child-map))
-                             (associate-layer-outputs (drop 1 built-description))
+                             (ordered-layer-outputs (drop 1 built-description))
                              (mapv reshape-layer-outputs))
 
           type-map (vec (map vector

  throws an exception if unable to parse."
  [out-name]
  (let [parts (string/split out-name #"_")]
    (if (= (count parts) 2)
      {:index (Long/parseLong (parts 1))
       :layer-type (keyword (parts 0))}
      (throw (ex-info "Expected format 'layertype_index' where index is an unsigned integer."
                {:cause      :bad-layer-name
                 :layer-name out-name

                      {:cause :missing-output
                       :layer lyr-map})))))
        desc-seq))


(defn- ordered-layer-outputs
  "Output a layer output per desc associated with that desc.
  Output may be nil for a given desc."
  [desc-seq output-seq]
  (loop [desc (first desc-seq)
         desc-seq (rest desc-seq)
         output-seq output-seq
         retval []]
    (if desc
      (let [[retval output-seq] (if (:embedded-activation desc)
                                  [(conj retval [desc nil]) output-seq]
                                  [(conj retval [desc (if (contains? desc :embedded)
                                                        (assoc (first output-seq) :layer-type :Activation)
                                                        (first output-seq))])
                                   (rest output-seq)])]
        (recur (first desc-seq) (rest desc-seq) output-seq retval))
      retval)))



(defn- check-output-dims
  "Given a mapping of vector tuples of built layer descriptions and output weights,
