       [retval])))
 
 (defn model->simple-description
+  "Returns a simple (unbuilt) model description given the hashmap literal
+  representation of a Keras JSON model description."
   [model]
   (let [model  (if (= (:class_name model) "Sequential")
                  (:config model)


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



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