p2irc / deepplantphenomics

Deep learning for plant phenotyping.
GNU General Public License v2.0
133 stars 46 forks source link

Learning rate decay bugfix #29

Closed donovanlavoie closed 5 years ago

donovanlavoie commented 5 years ago

This fixes Issue #24, where setting the learning rate decay would crash because it requires a value for total_training_samples; this value, however, is never set before starting training and having the input data set split and parsed.

The fix removes the requirement for that value in set_learning_rate_decay by moving the calculation for lr_decay_epochs into the private learning rate setter (__set_learning_rate), which gets called when starting training but after constructing the graph and splitting & parsing the input data set.

The test suite was also updated to check that the functions can run successfully for good inputs and that calling the private learning rate setter treats the existence of decay settings properly.