       [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 read-model
  [fname]
  (json/parse-string (slurp fname) keyword))


(defmulti model-item->desc (fn [item]
                             (keyword (:class_name item))))


(defmethod model-item->desc :Convolution2D



(defmethod model-item->desc :Dropout
  ;; Cortex uses keep probability, Keras uses drop probability.
  [{:keys [config]}]
  (assoc (first
          (desc/dropout (- 1.0 (:p config))))
         :id (keyword (:name config))))

(defmethod model-item->desc :Flatten
  ;; Cortex doesn't require a flatten in its model description.
  [_]
  [])

