Improve Keras Applications docstrings.
PiperOrigin-RevId: 330552839 Change-Id: Ie6533dfed5bb16abdb454731763e7144c1dc0037
This commit is contained in:
parent
1d7f71f9d6
commit
f67204eea0
@ -145,8 +145,9 @@ def DenseNet(
|
||||
Note that the data format convention used by the model is
|
||||
the one specified in your Keras config at `~/.keras/keras.json`.
|
||||
|
||||
Caution: Be sure to properly pre-process your inputs to the application.
|
||||
Please see `applications.densenet.preprocess_input` for an example.
|
||||
Note: each Keras Application expects a specific kind of input preprocessing.
|
||||
For DenseNet, call `tf.keras.applications.densenet.preprocess_input` on your
|
||||
inputs before passing them to the model.
|
||||
|
||||
Arguments:
|
||||
blocks: numbers of building blocks for the four dense layers.
|
||||
@ -382,9 +383,10 @@ DOC = """
|
||||
Optionally loads weights pre-trained on ImageNet.
|
||||
Note that the data format convention used by the model is
|
||||
the one specified in your Keras config at `~/.keras/keras.json`.
|
||||
|
||||
Caution: Be sure to properly pre-process your inputs to the application.
|
||||
Please see `applications.densenet.preprocess_input` for an example.
|
||||
|
||||
Note: each Keras Application expects a specific kind of input preprocessing.
|
||||
For DenseNet, call `tf.keras.applications.densenet.preprocess_input` on your
|
||||
inputs before passing them to the model.
|
||||
|
||||
Arguments:
|
||||
include_top: whether to include the fully-connected
|
||||
|
@ -61,8 +61,10 @@ def InceptionResNetV2(include_top=True,
|
||||
Note that the data format convention used by the model is
|
||||
the one specified in your Keras config at `~/.keras/keras.json`.
|
||||
|
||||
Caution: Be sure to properly pre-process your inputs to the application.
|
||||
Please see `applications.inception_resnet_v2.preprocess_input` for an example.
|
||||
Note: each Keras Application expects a specific kind of input preprocessing.
|
||||
For InceptionResNetV2, call
|
||||
`tf.keras.applications.inception_resnet_v2.preprocess_input`
|
||||
on your inputs before passing them to the model.
|
||||
|
||||
Arguments:
|
||||
include_top: whether to include the fully-connected
|
||||
|
@ -63,8 +63,9 @@ def InceptionV3(
|
||||
Note that the data format convention used by the model is
|
||||
the one specified in the `tf.keras.backend.image_data_format()`.
|
||||
|
||||
Caution: Be sure to properly pre-process your inputs to the application.
|
||||
Please see `applications.inception_v3.preprocess_input` for an example.
|
||||
Note: each Keras Application expects a specific kind of input preprocessing.
|
||||
For InceptionV3, call `tf.keras.applications.inception_v3.preprocess_input`
|
||||
on your inputs before passing them to the model.
|
||||
|
||||
Arguments:
|
||||
include_top: Boolean, whether to include the fully-connected
|
||||
|
@ -104,8 +104,9 @@ def MobileNet(input_shape=None,
|
||||
Note that the data format convention used by the model is
|
||||
the one specified in the `tf.keras.backend.image_data_format()`.
|
||||
|
||||
Caution: Be sure to properly pre-process your inputs to the application.
|
||||
Please see `applications.mobilenet.preprocess_input` for an example.
|
||||
Note: each Keras Application expects a specific kind of input preprocessing.
|
||||
For MobileNet, call `tf.keras.applications.mobilenet.preprocess_input`
|
||||
on your inputs before passing them to the model.
|
||||
|
||||
Arguments:
|
||||
input_shape: Optional shape tuple, only to be specified if `include_top`
|
||||
|
@ -111,8 +111,9 @@ def MobileNetV2(input_shape=None,
|
||||
|
||||
Optionally loads weights pre-trained on ImageNet.
|
||||
|
||||
Caution: Be sure to properly pre-process your inputs to the application.
|
||||
Please see `applications.mobilenet_v2.preprocess_input` for an example.
|
||||
Note: each Keras Application expects a specific kind of input preprocessing.
|
||||
For MobileNetV2, call `tf.keras.applications.mobilenet_v2.preprocess_input`
|
||||
on your inputs before passing them to the model.
|
||||
|
||||
Arguments:
|
||||
input_shape: Optional shape tuple, to be specified if you would
|
||||
|
@ -76,8 +76,10 @@ BASE_DOCSTRING = """Instantiates the {name} architecture.
|
||||
|
||||
Optionally loads weights pre-trained on ImageNet.
|
||||
|
||||
Caution: Be sure to properly pre-process your inputs to the application.
|
||||
Please see `applications.mobilenet_v3.preprocess_input` for an example.
|
||||
Note: each Keras Application expects a specific kind of input preprocessing.
|
||||
For MobileNetV3, call
|
||||
`tf.keras.applications.mobilenet_v3.preprocess_input` on your
|
||||
inputs before passing them to the model.
|
||||
|
||||
Arguments:
|
||||
input_shape: Optional shape tuple, to be specified if you would
|
||||
|
@ -86,9 +86,6 @@ def NASNet(
|
||||
Note that the data format convention used by the model is
|
||||
the one specified in your Keras config at `~/.keras/keras.json`.
|
||||
|
||||
Caution: Be sure to properly pre-process your inputs to the application.
|
||||
Please see `applications.nasnet.preprocess_input` for an example.
|
||||
|
||||
Arguments:
|
||||
input_shape: Optional shape tuple, the input shape
|
||||
is by default `(331, 331, 3)` for NASNetLarge and
|
||||
@ -331,7 +328,7 @@ def NASNetMobile(input_shape=None,
|
||||
pooling=None,
|
||||
classes=1000):
|
||||
"""Instantiates a Mobile NASNet model in ImageNet mode.
|
||||
|
||||
|
||||
Reference:
|
||||
- [Learning Transferable Architectures for Scalable Image Recognition](
|
||||
https://arxiv.org/abs/1707.07012) (CVPR 2018)
|
||||
@ -339,9 +336,10 @@ def NASNetMobile(input_shape=None,
|
||||
Optionally loads weights pre-trained on ImageNet.
|
||||
Note that the data format convention used by the model is
|
||||
the one specified in your Keras config at `~/.keras/keras.json`.
|
||||
|
||||
Caution: Be sure to properly pre-process your inputs to the application.
|
||||
Please see `applications.nasnet.preprocess_input` for an example.
|
||||
|
||||
Note: each Keras Application expects a specific kind of input preprocessing.
|
||||
For NASNet, call `tf.keras.applications.nasnet.preprocess_input` on your
|
||||
inputs before passing them to the model.
|
||||
|
||||
Arguments:
|
||||
input_shape: Optional shape tuple, only to be specified
|
||||
@ -407,7 +405,7 @@ def NASNetLarge(input_shape=None,
|
||||
pooling=None,
|
||||
classes=1000):
|
||||
"""Instantiates a NASNet model in ImageNet mode.
|
||||
|
||||
|
||||
Reference:
|
||||
- [Learning Transferable Architectures for Scalable Image Recognition](
|
||||
https://arxiv.org/abs/1707.07012) (CVPR 2018)
|
||||
@ -415,9 +413,10 @@ def NASNetLarge(input_shape=None,
|
||||
Optionally loads weights pre-trained on ImageNet.
|
||||
Note that the data format convention used by the model is
|
||||
the one specified in your Keras config at `~/.keras/keras.json`.
|
||||
|
||||
Caution: Be sure to properly pre-process your inputs to the application.
|
||||
Please see `applications.nasnet.preprocess_input` for an example.
|
||||
|
||||
Note: each Keras Application expects a specific kind of input preprocessing.
|
||||
For NASNet, call `tf.keras.applications.nasnet.preprocess_input` on your
|
||||
inputs before passing them to the model.
|
||||
|
||||
Arguments:
|
||||
input_shape: Optional shape tuple, only to be specified
|
||||
|
@ -79,9 +79,6 @@ def ResNet(stack_fn,
|
||||
Note that the data format convention used by the model is
|
||||
the one specified in your Keras config at `~/.keras/keras.json`.
|
||||
|
||||
Caution: Be sure to properly pre-process your inputs to the application.
|
||||
Please see `applications.resnet.preprocess_input` for an example.
|
||||
|
||||
Arguments:
|
||||
stack_fn: a function that returns output tensor for the
|
||||
stacked residual blocks.
|
||||
@ -545,9 +542,10 @@ DOC = """
|
||||
Optionally loads weights pre-trained on ImageNet.
|
||||
Note that the data format convention used by the model is
|
||||
the one specified in your Keras config at `~/.keras/keras.json`.
|
||||
|
||||
Caution: Be sure to properly pre-process your inputs to the application.
|
||||
Please see `applications.resnet.preprocess_input` for an example.
|
||||
|
||||
Note: each Keras Application expects a specific kind of input preprocessing.
|
||||
For ResNet, call `tf.keras.applications.resnet.preprocess_input` on your
|
||||
inputs before passing them to the model.
|
||||
|
||||
Arguments:
|
||||
include_top: whether to include the fully-connected
|
||||
|
@ -148,8 +148,9 @@ DOC = """
|
||||
Note that the data format convention used by the model is
|
||||
the one specified in your Keras config at `~/.keras/keras.json`.
|
||||
|
||||
Caution: Be sure to properly pre-process your inputs to the application.
|
||||
Please see `applications.resnet_v2.preprocess_input` for an example.
|
||||
Note: each Keras Application expects a specific kind of input preprocessing.
|
||||
For ResNetV2, call `tf.keras.applications.resnet_v2.preprocess_input` on your
|
||||
inputs before passing them to the model.
|
||||
|
||||
Arguments:
|
||||
include_top: whether to include the fully-connected
|
||||
|
@ -66,8 +66,9 @@ def VGG16(
|
||||
|
||||
The default input size for this model is 224x224.
|
||||
|
||||
Caution: Be sure to properly pre-process your inputs to the application.
|
||||
Please see `applications.vgg16.preprocess_input` for an example.
|
||||
Note: each Keras Application expects a specific kind of input preprocessing.
|
||||
For VGG16, call `tf.keras.applications.vgg16.preprocess_input` on your
|
||||
inputs before passing them to the model.
|
||||
|
||||
Arguments:
|
||||
include_top: whether to include the 3 fully-connected
|
||||
|
@ -66,8 +66,9 @@ def VGG19(
|
||||
|
||||
The default input size for this model is 224x224.
|
||||
|
||||
Caution: Be sure to properly pre-process your inputs to the application.
|
||||
Please see `applications.vgg19.preprocess_input` for an example.
|
||||
Note: each Keras Application expects a specific kind of input preprocessing.
|
||||
For VGG19, call `tf.keras.applications.vgg19.preprocess_input` on your
|
||||
inputs before passing them to the model.
|
||||
|
||||
Arguments:
|
||||
include_top: whether to include the 3 fully-connected
|
||||
|
@ -68,8 +68,9 @@ def Xception(
|
||||
the one specified in your Keras config at `~/.keras/keras.json`.
|
||||
Note that the default input image size for this model is 299x299.
|
||||
|
||||
Caution: Be sure to properly pre-process your inputs to the application.
|
||||
Please see `applications.xception.preprocess_input` for an example.
|
||||
Note: each Keras Application expects a specific kind of input preprocessing.
|
||||
For Xception, call `tf.keras.applications.xception.preprocess_input` on your
|
||||
inputs before passing them to the model.
|
||||
|
||||
Arguments:
|
||||
include_top: whether to include the fully-connected
|
||||
|
Loading…
Reference in New Issue
Block a user