Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit b7eb523

Browse files
authored
Merge branch 'master' into deepar-kix
2 parents 1352c1f + 3952724 commit b7eb523

File tree

463 files changed

+15611
-3418
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

463 files changed

+15611
-3418
lines changed

doc_source/IC-Hyperparameter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Hyperparameters are parameters that are set before a machine learning model begi
1818
| epochs | Number of training epochs\. **Optional** Valid values: positive integer Default value: 30 |
1919
| eps | The epsilon for `adam` and `rmsprop`\. It is usually set to a small value to avoid division by 0\. **Optional** Valid values: float\. Range in \[0, 1\]\. Default value: 1e\-8 |
2020
| gamma | The gamma for `rmsprop`, the decay factor for the moving average of the squared gradient\. **Optional** Valid values: float\. Range in \[0, 1\]\. Default value: 0\.9 |
21-
| image\_shape | The input image dimensions, which is the same size as the input layer of the network\. The format is defined as '`num_channels`, height, width'\. The image dimension can take on any value as the network can handle varied dimensions of the input\. However, there may be memory constraints if a larger image dimension is used\. Pretrained models can use only a fixed 224 x 224 image size\. Typical image dimensions for image classification are '3, 224, 224'\. This is similar to the ImageNet dataset\. For training, if any input image is smaller than this parameter in any dimension, training fails\. If an image is larger, a portion of the image is cropped, with the cropped area specified by this parameter\. If hyperparameter `augmentation_type` is set, random crop is taken; otherwise, central crop is taken\. At inference, input images are resized to the `image_shape` that was used during training\. Aspect ratio is not preserved, and images are not cropped\. **Optional** Valid values: string Default value: ‘3, 224, 224’ |
21+
| image\_shape | The input image dimensions, which is the same size as the input layer of the network\. The format is defined as '`num_channels`, height, width'\. The image dimension can take on any value as the network can handle varied dimensions of the input\. However, there may be memory constraints if a larger image dimension is used\. Pretrained models can use only a fixed 224 x 224 image size\. Typical image dimensions for image classification are '3,224,224'\. This is similar to the ImageNet dataset\. For training, if any input image is smaller than this parameter in any dimension, training fails\. If an image is larger, a portion of the image is cropped, with the cropped area specified by this parameter\. If hyperparameter `augmentation_type` is set, random crop is taken; otherwise, central crop is taken\. At inference, input images are resized to the `image_shape` that was used during training\. Aspect ratio is not preserved, and images are not cropped\. **Optional** Valid values: string Default value: ‘3,224,224’ |
2222
| kv\_store | Weight update synchronization mode during distributed training\. The weight updates can be updated either synchronously or asynchronously across machines\. Synchronous updates typically provide better accuracy than asynchronous updates but can be slower\. See distributed training in MXNet for more details\. This parameter is not applicable to single machine training\. [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sagemaker/latest/dg/IC-Hyperparameter.html) **Optional** Valid values: `dist_sync` or `dist_async` Default value: no default value |
2323
| learning\_rate | Initial learning rate\. **Optional** Valid values: float\. Range in \[0, 1\]\. Default value: 0\.1 |
2424
| lr\_scheduler\_factor | The ratio to reduce learning rate used in conjunction with the `lr_scheduler_step` parameter, defined as `lr_new` = `lr_old` \* `lr_scheduler_factor`\. **Optional** Valid values: float\. Range in \[0, 1\]\. Default value: 0\.1 |

doc_source/IC-TF-HowItWorks.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# How Image Classification \- TensorFlow Works<a name="IC-TF-HowItWorks"></a>
2+
3+
The Image Classification \- TensorFlow algorithm takes an image as input and classifies it into one of the output class labels\. Various deep learning networks such as MobileNet, ResNet, Inception, and EfficientNet are highly accurate for image classification\. There are also deep learning networks that are trained on large image datasets, such as ImageNet, which has over 11 million images and almost 11,000 classes\. After a network is trained with ImageNet data, you can then fine\-tune the network on a dataset with a particular focus to perform more specific classification tasks\. The Amazon SageMaker Image Classification \- TensorFlow algorithm supports transfer learning on many pretrained models that are available in the TensorFlow Hub\.
4+
5+
According to the number of class labels in your training data, a classification layer is attached to the pretrained Transfer Family Hub model of your choice\. The classification layer consists of a dropout layer, a dense layer, and a fully\-connected layer with 2\-norm regularizer that is initialized with random weights\. The model has hyperparameters for the dropout rate of the dropout layer and the L2 regularization factor for the dense layer\. You can then fine\-tune either the entire network \(including the pretrained model\) or only the top classification layer on new training data\. With this method of transfer learning, training with smaller datasets is possible\.

doc_source/IC-TF-Hyperparameter.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Image Classification \- TensorFlow Hyperparameters<a name="IC-TF-Hyperparameter"></a>
2+
3+
Hyperparameters are parameters that are set before a machine learning model begins learning\. The following hyperparameters are supported by the Amazon SageMaker built\-in Image Classification \- TensorFlow algorithm\. See [Tune an Image Classification \- TensorFlow model](IC-TF-tuning.md) for information on hyperparameter tuning\.
4+
5+
6+
| Parameter Name | Description |
7+
| --- | --- |
8+
| augmentation | Set to `"True"` to apply `augmentation_random_flip`, `augmentation_random_rotation`, and `augmentation_random_zoom` to the training data\. Valid values: string, either: \(`"True"` or `"False"`\)\. Default value: `"False"`\. |
9+
| augmentation\_random\_flip | Indicates which flip mode to use for data augmentation when `augmentation` is set to `"True"`\. For more information, see [RandomFlip](https://www.tensorflow.org/api_docs/python/tf/keras/layers/RandomFlip) in the TensorFlow documentation\. Valid values: string, any of the following: \(`"horizontal_and_vertical"`, `"vertical"`, or `"None"`\)\. Default value: `"horizontal_and_vertical"`\. |
10+
| augmentation\_random\_rotation | Indicates how much rotation to use for data augmentation when `augmentation` is set to `"True"`\. Values represent a fraction of 2π\. Positive values rotate counterclockwise while negative values rotate clockwise\. `0` means no rotation\. For more information, see [RandomRotation](https://www.tensorflow.org/api_docs/python/tf/keras/layers/RandomRotation) in the TensorFlow documentation\. Valid values: float, range: \[`-1.0`, `1.0`\]\. Default value: `0.2`\. |
11+
| augmentation\_random\_zoom | Indicates how much vertical zoom to use for data augmentation when `augmentation` is set to `"True"`\. Positive values zoom out while negative values zoom in\. `0` means no zoom\. For more information, see [RandomZoom](https://www.tensorflow.org/api_docs/python/tf/keras/layers/RandomZoom) in the TensorFlow documentation\. Valid values: float, range: \[`-1.0`, `1.0`\]\. Default value: `0.1`\. |
12+
| batch\_size | The batch size for training\. For training on instances with multiple GPUs, this batch size is used across the GPUs\. Valid values: positive integer\. Default value: `32`\. |
13+
| beta\_1 | The beta1 for the `"adam"` optimizer\. Represents the exponential decay rate for the first moment estimates\. Ignored for other optimizers\. Valid values: float, range: \[`0.0`, `1.0`\]\. Default value: `0.9`\. |
14+
| beta\_2 | The beta2 for the `"adam"` optimizer\. Represents the exponential decay rate for the second moment estimates\. Ignored for other optimizers\. Valid values: float, range: \[`0.0`, `1.0`\]\. Default value: `0.999`\. |
15+
| binary\_mode | When `binary_mode` is set to `"True"`, the model returns a single probability number for the positive class and can use additional `eval_metric` options\. Use only for binary classification problems\. Valid values: string, either: \(`"True"` or `"False"`\)\. Default value: `"False"`\. |
16+
| dropout\_rate | The dropout rate for the dropout layer in the top classification layer\. Valid values: float, range: \[`0.0`, `1.0`\]\. Default value: `0.2` |
17+
| early\_stopping | Set to `"True"` to use early stopping logic during training\. If `"False"`, early stopping is not used\. Valid values: string, either: \(`"True"` or `"False"`\)\. Default value: `"False"`\. |
18+
| early\_stopping\_min\_delta | The minimum change needed to qualify as an improvement\. An absolute change less than the value of early\_stopping\_delta does not qualify as improvement\. Used only when early\_stopping is set to "True"\.Valid values: float, range: \[`0.0`, `1.0`\]\.Default value: `0.0`\. |
19+
| early\_stopping\_patience | The number of epochs to continue training with no improvement\. Used only when `early_stopping` is set to `"True"`\. Valid values: positive integer\. Default value: `5`\. |
20+
| epochs | The number of training epochs\. Valid values: positive integer\. Default value: `3`\. |
21+
| epsilon | The epsilon for `"adam"`, `"rmsprop"`, `"adadelta"`, and `"adagrad"` optimizers\. Usually set to a small value to avoid division by 0\. Ignored for other optimizers\. Valid values: float, range: \[`0.0`, `1.0`\]\. Default value: `1e-7`\. |
22+
| eval\_metric | If `binary_mode` is set to `"False"`, `eval_metric` can only be `"accuracy"`\. If `binary_mode` is `"True"`, select any of the valid values\. For more information, see [Metrics](https://www.tensorflow.org/api_docs/python/tf/keras/metrics) in the TensorFlow documentation\. Valid values: string, any of the following: \(`"accuracy"`, `"precision"`, `"recall"`, `"auc"`, or `"prc"`\)\. Default value: `"accuracy"`\. |
23+
| image\_resize\_interpolation | Indicates interpolation method used when resizing images\. For more information, see [image\.resize](https://www.tensorflow.org/api_docs/python/tf/image/resize) in the TensorFlow documentation\. Valid values: string, any of the following: \(`"bilinear"`, `"nearest"`, `"bicubic"`, `"area"`,` "lanczos3"` , `"lanczos5"`, `"gaussian"`, or `"mitchellcubic"`\)\. Default value: `"bilinear"`\. |
24+
| initial\_accumulator\_value | The starting value for the accumulators, or the per\-parameter momentum values, for the `"adagrad"` optimizer\. Ignored for other optimizers\. Valid values: float, range: \[`0.0`, `1.0`\]\. Default value: `0.0001`\. |
25+
| label\_smoothing | Indicates how much to relax the confidence on label values\. For example, if `label_smoothing` is `0.1`, then non\-target labels are `0.1/num_classes `and target labels are `0.9+0.1/num_classes`\. Valid values: float, range: \[`0.0`, `1.0`\]\. Default value: `0.1`\. |
26+
| learning\_rate | The optimizer learning rate\. Valid values: float, range: \[`0.0`, `1.0`\]\.Default value: `0.001`\. |
27+
| momentum | The momentum for `"sgd"`, `"nesterov"`, and `"rmsprop"` optimizers\. Ignored for other optimizers\. Valid values: float, range: \[`0.0`, `1.0`\]\. Default value: `0.9`\. |
28+
| optimizer | The optimizer type\. For more information, see [Optimizers](https://www.tensorflow.org/api_docs/python/tf/keras/optimizers) in the TensorFlow documentation\. Valid values: string, any of the following: \(`"adam"`, `"sgd"`, `"nesterov"`, `"rmsprop"`,` "adagrad"` , `"adadelta"`\)\. Default value: `"adam"`\. |
29+
| regularizers\_l2 | The L2 regularization factor for the dense layer in the classification layer\. Valid values: float, range: \[`0.0`, `1.0`\]\. Default value: `.0001`\. |
30+
| reinitialize\_top\_layer | If set to `"Auto"`, the top classification layer parameters are re\-initialized during fine\-tuning\. For incremental training, top classification layer parameters are not re\-initialized unless set to `"True"`\. Valid values: string, any of the following: \(`"Auto"`, `"True"` or `"False"`\)\. Default value: `"Auto"`\. |
31+
| rho | The discounting factor for the gradient of the `"adadelta"` and `"rmsprop"` optimizers\. Ignored for other optimizers\. Valid values: float, range: \[`0.0`, `1.0`\]\. Default value: `0.95`\. |
32+
| train\_only\_on\_top\_layer | If `"True"`, only the top classification layer parameters are fine\-tuned\. If `"False"`, all model parameters are fine\-tuned\. Valid values: string, either: \(`"True"` or `"False"`\)\. Default value: `"False"`\. |

0 commit comments

Comments
 (0)