Skip to content

Instantly share code, notes, and snippets.

@joycex99
Created June 27, 2017 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joycex99/36072242a770a57f5f4d189a2c371ad8 to your computer and use it in GitHub Desktop.
Save joycex99/36072242a770a57f5f4d189a2c371ad8 to your computer and use it in GitHub Desktop.
(defn train
"Trains network for :epoch-count number of epochs"
[]
(let [network (network/linear-network network-description)
[train-orig test-ds] (get-train-test-dataset)
train-ds (experiment-util/infinite-class-balanced-dataset train-orig
:class-key :label
:epoch-size (:epoch-size params))]
(experiment-train/train-n network train-ds test-ds
:batch-size (:batch-size params)
:epoch-count (:epoch-count params)
:optimizer (:optimizer params)
:test-fn f1-test-fn)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment