(backup-trained-network network-filestem)
(default-network-loss-eval-fn simple-loss-print? new-network test-ds batch-size)
Evaluate the network using its current loss terms
Evaluate the network using its current loss terms
(default-network-test-fn loss-val-fn
loss-compare-fn
{:keys [batch-size context]}
{:keys [new-network old-network test-ds]})
Test functions take two map arguments, one with global information and one with information local to the epoch. The job of a test function is to return a map indicating if the new network is indeed the best one and the network with enough information added to make comparing networks possible. {:best-network? boolean :network (assoc new-network :whatever information-needed-to-compare).}
Test functions take two map arguments, one with global information and one with information local to the epoch. The job of a test function is to return a map indicating if the new network is indeed the best one and the network with enough information added to make comparing networks possible. {:best-network? boolean :network (assoc new-network :whatever information-needed-to-compare).}
(load-network network-filename)
Loads a map of {:cv-loss :network-description}.
Loads a map of {:cv-loss :network-description}.
(print-trained-networks-summary
&
{:keys [network-filestem cv-loss->number cv-loss-display-precision extra-keys]
:or {network-filestem default-network-filestem
cv-loss->number (fn* [p1__67962#] (apply + (vals p1__67962#)))
cv-loss-display-precision 3}})
Prints a summary of the different networks trained so far.
Respects an (optional) network-filestem
.
Prints a summary of the different networks trained so far. Respects an (optional) `network-filestem`.
(save-network network network-filename)
Saves a trained network out to the filesystem.
Saves a trained network out to the filesystem.
(train-n network
train-ds
test-ds
&
{:keys [batch-size epoch-count network-filestem optimizer reset-score
force-gpu? simple-loss-print? test-fn context]
:or {batch-size 128
network-filestem default-network-filestem
reset-score false}})
Given a network description, start training from scratch or given a trained network continue training. Keeps track of networks that are actually improving against a test-ds.
Networks are saved with a :cv-loss
that is set to the best cv loss so far.
This system expects a dataset with online data augmentation so that it is
effectively infinite although the cross-validation and holdout sets do not
change. By default, the best network is saved to: trained-network.nippy
Note, we have to have enough memory to store the cross-validation dataset in memory while training.
Every epoch a test function is called with these 2 map arguments:
(test-fn global-context epoch-context)
It must return a map containing at least: {:best-network? true if this is the best network :network The new network with any extra information needed for comparison assoc'd onto it.}
If epoch-count is provided then we stop training after that many epochs else we continue to train forever.
Given a network description, start training from scratch or given a trained network continue training. Keeps track of networks that are actually improving against a test-ds. Networks are saved with a `:cv-loss` that is set to the best cv loss so far. This system expects a dataset with online data augmentation so that it is effectively infinite although the cross-validation and holdout sets do not change. By default, the best network is saved to: `trained-network.nippy` Note, we have to have enough memory to store the cross-validation dataset in memory while training. Every epoch a test function is called with these 2 map arguments: (test-fn global-context epoch-context) It must return a map containing at least: {:best-network? true if this is the best network :network The new network with any extra information needed for comparison assoc'd onto it.} If epoch-count is provided then we stop training after that many epochs else we continue to train forever.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close