Skip to content

Supported Flags for Retraining

Debayan Deb edited this page Oct 25, 2017 · 6 revisions

This page details all the supported flags for retraining.

Logistics

FLAG Help
image_dir Relative path to the root folder of your labeled dataset (Default '')
output_graph Path where the trained frozen graph is saved (Default 'tmp/output_graph.pb')
intermediate_output_graphs_dir Path where the intermediate frozen graphs are saved (Default '')
intermediate_store_frequency Number of steps to store intermediate frozen graphs. If 0, then no storing. (Default 0)
output_labels Path to save the trained graph's output labels (Default 'tmp/output_labels.txt')
summaries_dir Path to save the summary logs for Tensorboard Visualization (Default 'tmp/retrain_logs')
model_dir Path to save the frozen ImageNet pre-trained (Inception_v3 or Mobilenet) models (Default 'tmp/imagenet')
bottleneck_dir Path to cache bottleneck layer values as text files (Default 'tmp/bottleneck')

Dataset

FLAG Help
testing_percentage Percentage of images per class to use as test set (Default 10)
validation_percentage Percentage of images per class to use as validation set (Default 10)
flip_left_right Whether to randomly flip half of the training images horizontally (Default False)
random_scale Percentage to randomly scale up the size of the training images (Default 0)
random_crop Percentage determining the margin to randomly crop off the training images (Default 0)
random_brightness Percentage determining how much to multiply the training image pixels up or down by (Default 0)

Training Flags

FLAGS Help
learning_rate Learning rate parameter (Default 0.01)
how_many_training_steps Number of training steps to run until finish (Default 4000)
eval_step_interval Frequency of evaluating training results (Default 10)
train_batch_size Number of images to train at a time (Default 100)
test_batch_size Number of images to test on. The test set is evaluated only once after training ceases. -1 implies entire test dataset is evaluated at a time, giving more stable results across runs. (Default -1)
validation_batch_size Number of images to use in evaluation batch. The validation set is more often than testing set and gives an early indication on the progress of training. -1 implies entire test dataset is evaluated at a time, giving more stable results across runs, but might be slower on larger datasets. (Default -1)
print_misclassified_test_images Whether to print out a list of all misclassified test images (Default False)
center_loss Use center loss along-side cross-entropy (Softmax) loss function (Default False)
center_loss_alpha Amount to update the center by (Default 0)
center_loss_factor Ratio of the affect of center loss on total loss (Default 0)

Network Configuration

FLAGS Help
final_tensor_name Name of the output classification layer in the retrained graph
architecture Which model architecture to use. inception_v3 is the most accurate, but also the slowest. For faster or smaller models, chose a MobileNet with the form mobilenet_<parameter size>_<input_size>[_quantized]. For example, mobilenet_1.0_224 will pick a model that is 17 MB in size and takes 224 pixel input images, while mobilenet_0.25_128_quantized will choose a much less accurate, but smaller and faster network that's 920 KB on disk and takes 128x128 images.
Clone this wiki locally