Commit cbd37d56 authored by Davis King's avatar Davis King

Cleaned up the contracts a little.

parent 7a31806b
...@@ -73,6 +73,7 @@ namespace dlib ...@@ -73,6 +73,7 @@ namespace dlib
- #get_iterations_without_progress_threshold() == 2000 - #get_iterations_without_progress_threshold() == 2000
- #get_learning_rate_shrink_factor() == 0.1 - #get_learning_rate_shrink_factor() == 0.1
- #get_learning_rate_schedule().size() == 0 - #get_learning_rate_schedule().size() == 0
- #get_train_one_step_calls() == 0
- if (cuda_extra_devices.size() > 0) then - if (cuda_extra_devices.size() > 0) then
- This object will use multiple graphics cards to run the learning - This object will use multiple graphics cards to run the learning
algorithms. In particular, it will always use whatever device is algorithms. In particular, it will always use whatever device is
...@@ -298,12 +299,8 @@ namespace dlib ...@@ -298,12 +299,8 @@ namespace dlib
unsigned long long get_train_one_step_calls ( unsigned long long get_train_one_step_calls (
) const; ) const;
/*! /*!
requires
- training process should be done with #train_one_step()
ensures ensures
- Each #train_one_step() call increases this counter. It can be used to understand the training - returns the number of times train_one_step() has been called.
stage to make some additional processing like snapshotting or extra testing
- This value is serialized/deserialized via synchronization file
!*/ !*/
void be_verbose ( void be_verbose (
...@@ -414,6 +411,7 @@ namespace dlib ...@@ -414,6 +411,7 @@ namespace dlib
calling this function you should call get_net() before you touch the net calling this function you should call get_net() before you touch the net
object from the calling thread to ensure no other threads are still object from the calling thread to ensure no other threads are still
accessing the network. accessing the network.
- #get_train_one_step_calls() == get_train_one_step_calls() + 1.
!*/ !*/
void train_one_step ( void train_one_step (
...@@ -437,6 +435,7 @@ namespace dlib ...@@ -437,6 +435,7 @@ namespace dlib
calling this function you should call get_net() before you touch the net calling this function you should call get_net() before you touch the net
object from the calling thread to ensure no other threads are still object from the calling thread to ensure no other threads are still
accessing the network. accessing the network.
- #get_train_one_step_calls() == get_train_one_step_calls() + 1.
!*/ !*/
double get_average_loss ( double get_average_loss (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment