From 8fd2dc0bed674e9098e4de312f571e6ba9a70550 Mon Sep 17 00:00:00 2001 From: Michael Foiani Date: Mon, 2 May 2022 17:43:39 -0400 Subject: Basic start. Implemented skeleton of loss functions. --- hyperparameters.py | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 hyperparameters.py (limited to 'hyperparameters.py') 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 -- cgit v1.2.3-70-g09d2