diff options
author | Michael Foiani <sotech117@michaels-mbp-3.devices.brown.edu> | 2022-05-02 17:43:39 -0400 |
---|---|---|
committer | Michael Foiani <sotech117@michaels-mbp-3.devices.brown.edu> | 2022-05-02 17:43:39 -0400 |
commit | 8fd2dc0bed674e9098e4de312f571e6ba9a70550 (patch) | |
tree | 037df062239abe47b3531f502612d4e3df64b572 /hyperparameters.py | |
parent | 06c92ad29268525c151dc96323e8a40b75e0d9c8 (diff) |
Basic start. Implemented skeleton of loss functions.
Diffstat (limited to 'hyperparameters.py')
-rw-r--r-- | hyperparameters.py | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/hyperparameters.py b/hyperparameters.py new file mode 100644 index 00000000..487023f3 --- /dev/null +++ b/hyperparameters.py @@ -0,0 +1,55 @@ +""" +Homework 5 - CNNs +CS1430 - Computer Vision +Brown University +""" + +""" +Number of epochs. If you experiment with more complex networks you +might need to increase this. Likewise if you add regularization that +slows training. +""" +num_epochs = 50 + +""" +A critical parameter that can dramatically affect whether training +succeeds or fails. The value for this depends significantly on which +optimizer is used. Refer to the default learning rate parameter +""" +learning_rate = 1e-4 + +""" +Momentum on the gradient (if you use a momentum-based optimizer) +""" +momentum = 0.01 + +""" +Resize image size for task 1. Task 3 must have an image size of 224, +so that is hard-coded elsewhere. +""" +img_size = 224 + +""" +Sample size for calculating the mean and standard deviation of the +training data. This many images will be randomly seleted to be read +into memory temporarily. +""" +preprocess_sample_size = 400 + +""" +Maximum number of weight files to save to checkpoint directory. If +set to a number <= 0, then all weight files of every epoch will be +saved. Otherwise, only the weights with highest accuracy will be saved. +""" +max_num_weights = 5 + +""" +Defines the number of training examples per batch. +You don't need to modify this. +""" +batch_size = 10 + +""" +The number of image scene classes. Don't change this. +""" +num_classes = 15 |