 
 
 (defn load-weights-for-description
+  "Given a `desc-seq`, which consists of pairs of layers from the unbuilt and built
+  versions of the model description, and the name of the hdf5 file which stores the
+  weights, loads the weights for the model."
   [desc-seq weights-fname]
   (resource/with-resource-context
     (load-weights desc-seq (hdf5/open-file weights-fname))))



(defmethod model-item->desc :Dropout
  [{:keys [config]}]
  (assoc (first
          (desc/dropout (- 1.0 (:p config))))
         :id (keyword (:name config))))

(defmethod model-item->desc :Flatten
  [_]
  [])



(defn- associate-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)
