neulab/docprompting-conala huggingface dataset:
tf.keras.applications.ResNet101     View source on GitHub    Instantiates the ResNet101 architecture.  View aliases  Main aliases 
tf.keras.applications.resnet.ResNet101 Compat aliases for migration See Migration guide for more details. tf.compat.v1.keras.applications.ResNet101, tf.compat.v1.keras.applications.resnet.ResNet101  
tf.keras.applications.ResNet101(
    include_top=True, weights='imagenet', input_tensor=None,
    input_shape=None, pooling=None, classes=1000, **kwargs
)
 Reference:  
Deep Residual Learning for Image Recognition (CVPR 2015)  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. 
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 layer at the top of the network.  
  weights   one of None (random initialization), 'imagenet' (pre-training on ImageNet), or the path to the weights file to be loaded.  
  input_tensor   optional Keras tensor (i.e. output of layers.Input()) to use as image input for the model.  
  input_shape   optional shape tuple, only to be specified if include_top is False (otherwise the input shape has to be (224, 224, 3) (with 'channels_last' data format) or (3, 224, 224) (with 'channels_first' data format). It should have exactly 3 inputs channels, and width and height should be no smaller than 32. E.g. (200, 200, 3) would be one valid value.  
  pooling   Optional pooling mode for feature extraction when include_top is False.  
None means that the output of the model will be the 4D tensor output of the last convolutional block. 
avg means that global average pooling will be applied to the output of the last convolutional block, and thus the output of the model will be a 2D tensor. 
max means that global max pooling will be applied. 

 
  classes   optional number of classes to classify images into, only to be specified if include_top is True, and if no weights argument is specified.   
 


 Returns   A Keras model instance.
tf.keras.applications.ResNet101V2     View source on GitHub    Instantiates the ResNet101V2 architecture.  View aliases  Main aliases 
tf.keras.applications.resnet_v2.ResNet101V2 Compat aliases for migration See Migration guide for more details. tf.compat.v1.keras.applications.ResNet101V2, tf.compat.v1.keras.applications.resnet_v2.ResNet101V2  
tf.keras.applications.ResNet101V2(
    include_top=True, weights='imagenet', input_tensor=None,
    input_shape=None, pooling=None, classes=1000,
    classifier_activation='softmax'
)
 Reference:  
Identity Mappings in Deep Residual Networks (CVPR 2016)  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. 
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 layer at the top of the network.  
  weights   one of None (random initialization), 'imagenet' (pre-training on ImageNet), or the path to the weights file to be loaded.  
  input_tensor   optional Keras tensor (i.e. output of layers.Input()) to use as image input for the model.  
  input_shape   optional shape tuple, only to be specified if include_top is False (otherwise the input shape has to be (224, 224, 3) (with 'channels_last' data format) or (3, 224, 224) (with 'channels_first' data format). It should have exactly 3 inputs channels, and width and height should be no smaller than 32. E.g. (200, 200, 3) would be one valid value.  
  pooling   Optional pooling mode for feature extraction when include_top is False.  
None means that the output of the model will be the 4D tensor output of the last convolutional block. 
avg means that global average pooling will be applied to the output of the last convolutional block, and thus the output of the model will be a 2D tensor. 
max means that global max pooling will be applied. 

 
  classes   optional number of classes to classify images into, only to be specified if include_top is True, and if no weights argument is specified.  
  classifier_activation   A str or callable. The activation function to use on the "top" layer. Ignored unless include_top=True. Set classifier_activation=None to return the logits of the "top" layer.   
 


 Returns   A keras.Model instance.
tf.keras.applications.ResNet152     View source on GitHub    Instantiates the ResNet152 architecture.  View aliases  Main aliases 
tf.keras.applications.resnet.ResNet152 Compat aliases for migration See Migration guide for more details. tf.compat.v1.keras.applications.ResNet152, tf.compat.v1.keras.applications.resnet.ResNet152  
tf.keras.applications.ResNet152(
    include_top=True, weights='imagenet', input_tensor=None,
    input_shape=None, pooling=None, classes=1000, **kwargs
)
 Reference:  
Deep Residual Learning for Image Recognition (CVPR 2015)  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. 
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 layer at the top of the network.  
  weights   one of None (random initialization), 'imagenet' (pre-training on ImageNet), or the path to the weights file to be loaded.  
  input_tensor   optional Keras tensor (i.e. output of layers.Input()) to use as image input for the model.  
  input_shape   optional shape tuple, only to be specified if include_top is False (otherwise the input shape has to be (224, 224, 3) (with 'channels_last' data format) or (3, 224, 224) (with 'channels_first' data format). It should have exactly 3 inputs channels, and width and height should be no smaller than 32. E.g. (200, 200, 3) would be one valid value.  
  pooling   Optional pooling mode for feature extraction when include_top is False.  
None means that the output of the model will be the 4D tensor output of the last convolutional block. 
avg means that global average pooling will be applied to the output of the last convolutional block, and thus the output of the model will be a 2D tensor. 
max means that global max pooling will be applied. 

 
  classes   optional number of classes to classify images into, only to be specified if include_top is True, and if no weights argument is specified.   
 


 Returns   A Keras model instance.
tf.keras.applications.ResNet152V2     View source on GitHub    Instantiates the ResNet152V2 architecture.  View aliases  Main aliases 
tf.keras.applications.resnet_v2.ResNet152V2 Compat aliases for migration See Migration guide for more details. tf.compat.v1.keras.applications.ResNet152V2, tf.compat.v1.keras.applications.resnet_v2.ResNet152V2  
tf.keras.applications.ResNet152V2(
    include_top=True, weights='imagenet', input_tensor=None,
    input_shape=None, pooling=None, classes=1000,
    classifier_activation='softmax'
)
 Reference:  
Identity Mappings in Deep Residual Networks (CVPR 2016)  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. 
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 layer at the top of the network.  
  weights   one of None (random initialization), 'imagenet' (pre-training on ImageNet), or the path to the weights file to be loaded.  
  input_tensor   optional Keras tensor (i.e. output of layers.Input()) to use as image input for the model.  
  input_shape   optional shape tuple, only to be specified if include_top is False (otherwise the input shape has to be (224, 224, 3) (with 'channels_last' data format) or (3, 224, 224) (with 'channels_first' data format). It should have exactly 3 inputs channels, and width and height should be no smaller than 32. E.g. (200, 200, 3) would be one valid value.  
  pooling   Optional pooling mode for feature extraction when include_top is False.  
None means that the output of the model will be the 4D tensor output of the last convolutional block. 
avg means that global average pooling will be applied to the output of the last convolutional block, and thus the output of the model will be a 2D tensor. 
max means that global max pooling will be applied. 

 
  classes   optional number of classes to classify images into, only to be specified if include_top is True, and if no weights argument is specified.  
  classifier_activation   A str or callable. The activation function to use on the "top" layer. Ignored unless include_top=True. Set classifier_activation=None to return the logits of the "top" layer.   
 


 Returns   A keras.Model instance.
Module: tf.keras.applications.resnet50 Public API for tf.keras.applications.resnet50 namespace. Functions ResNet50(...): Instantiates the ResNet50 architecture. decode_predictions(...): Decodes the prediction of an ImageNet model. preprocess_input(...): Preprocesses a tensor or Numpy array encoding a batch of images.
tf.keras.applications.ResNet50V2     View source on GitHub    Instantiates the ResNet50V2 architecture.  View aliases  Main aliases 
tf.keras.applications.resnet_v2.ResNet50V2 Compat aliases for migration See Migration guide for more details. tf.compat.v1.keras.applications.ResNet50V2, tf.compat.v1.keras.applications.resnet_v2.ResNet50V2  
tf.keras.applications.ResNet50V2(
    include_top=True, weights='imagenet', input_tensor=None,
    input_shape=None, pooling=None, classes=1000,
    classifier_activation='softmax'
)
 Reference:  
Identity Mappings in Deep Residual Networks (CVPR 2016)  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. 
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 layer at the top of the network.  
  weights   one of None (random initialization), 'imagenet' (pre-training on ImageNet), or the path to the weights file to be loaded.  
  input_tensor   optional Keras tensor (i.e. output of layers.Input()) to use as image input for the model.  
  input_shape   optional shape tuple, only to be specified if include_top is False (otherwise the input shape has to be (224, 224, 3) (with 'channels_last' data format) or (3, 224, 224) (with 'channels_first' data format). It should have exactly 3 inputs channels, and width and height should be no smaller than 32. E.g. (200, 200, 3) would be one valid value.  
  pooling   Optional pooling mode for feature extraction when include_top is False.  
None means that the output of the model will be the 4D tensor output of the last convolutional block. 
avg means that global average pooling will be applied to the output of the last convolutional block, and thus the output of the model will be a 2D tensor. 
max means that global max pooling will be applied. 

 
  classes   optional number of classes to classify images into, only to be specified if include_top is True, and if no weights argument is specified.  
  classifier_activation   A str or callable. The activation function to use on the "top" layer. Ignored unless include_top=True. Set classifier_activation=None to return the logits of the "top" layer.   
 


 Returns   A keras.Model instance.
Module: tf.keras.applications.resnet_v2 ResNet v2 models for Keras. Reference:  
Identity Mappings in Deep Residual Networks (CVPR 2016)  Functions ResNet101V2(...): Instantiates the ResNet101V2 architecture. ResNet152V2(...): Instantiates the ResNet152V2 architecture. ResNet50V2(...): Instantiates the ResNet50V2 architecture. decode_predictions(...): Decodes the prediction of an ImageNet model. preprocess_input(...): Preprocesses a tensor or Numpy array encoding a batch of images.
tf.keras.applications.resnet_v2.decode_predictions     View source on GitHub    Decodes the prediction of an ImageNet model.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.keras.applications.resnet_v2.decode_predictions  
tf.keras.applications.resnet_v2.decode_predictions(
    preds, top=5
)

 


 Arguments
  preds   Numpy array encoding a batch of predictions.  
  top   Integer, how many top-guesses to return. Defaults to 5.   
 


 Returns   A list of lists of top class prediction tuples (class_name, class_description, score). One list of tuples per sample in batch input.  

 


 Raises
  ValueError   In case of invalid shape of the pred array (must be 2D).
tf.keras.applications.resnet_v2.preprocess_input     View source on GitHub    Preprocesses a tensor or Numpy array encoding a batch of images.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.keras.applications.resnet_v2.preprocess_input  
tf.keras.applications.resnet_v2.preprocess_input(
    x, data_format=None
)
 Usage example with applications.MobileNet: i = tf.keras.layers.Input([None, None, 3], dtype = tf.uint8)
x = tf.cast(i, tf.float32)
x = tf.keras.applications.mobilenet.preprocess_input(x)
core = tf.keras.applications.MobileNet()
x = core(x)
model = tf.keras.Model(inputs=[i], outputs=[x])

image = tf.image.decode_png(tf.io.read_file('file.png'))
result = model(image)

 


 Arguments
  x   A floating point numpy.array or a tf.Tensor, 3D or 4D with 3 color channels, with values in the range [0, 255]. The preprocessed data are written over the input data if the data types are compatible. To avoid this behaviour, numpy.copy(x) can be used.  
  data_format   Optional data format of the image tensor/array. Defaults to None, in which case the global setting tf.keras.backend.image_data_format() is used (unless you changed it, it defaults to "channels_last").   
 


 Returns   Preprocessed numpy.array or a tf.Tensor with type float32. The inputs pixel values are scaled between -1 and 1, sample-wise. 
 

 


 Raises
  ValueError   In case of unknown data_format argument.
Module: tf.keras.applications.vgg16 VGG16 model for Keras. Reference:  
Very Deep Convolutional Networks for Large-Scale Image Recognition (ICLR 2015)  Functions VGG16(...): Instantiates the VGG16 model. decode_predictions(...): Decodes the prediction of an ImageNet model. preprocess_input(...): Preprocesses a tensor or Numpy array encoding a batch of images.
tf.keras.applications.vgg16.decode_predictions     View source on GitHub    Decodes the prediction of an ImageNet model.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.keras.applications.vgg16.decode_predictions  
tf.keras.applications.vgg16.decode_predictions(
    preds, top=5
)

 


 Arguments
  preds   Numpy array encoding a batch of predictions.  
  top   Integer, how many top-guesses to return. Defaults to 5.   
 


 Returns   A list of lists of top class prediction tuples (class_name, class_description, score). One list of tuples per sample in batch input.  

 


 Raises
  ValueError   In case of invalid shape of the pred array (must be 2D).
tf.keras.applications.vgg16.preprocess_input     View source on GitHub    Preprocesses a tensor or Numpy array encoding a batch of images.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.keras.applications.vgg16.preprocess_input  
tf.keras.applications.vgg16.preprocess_input(
    x, data_format=None
)
 Usage example with applications.MobileNet: i = tf.keras.layers.Input([None, None, 3], dtype = tf.uint8)
x = tf.cast(i, tf.float32)
x = tf.keras.applications.mobilenet.preprocess_input(x)
core = tf.keras.applications.MobileNet()
x = core(x)
model = tf.keras.Model(inputs=[i], outputs=[x])

image = tf.image.decode_png(tf.io.read_file('file.png'))
result = model(image)

 


 Arguments
  x   A floating point numpy.array or a tf.Tensor, 3D or 4D with 3 color channels, with values in the range [0, 255]. The preprocessed data are written over the input data if the data types are compatible. To avoid this behaviour, numpy.copy(x) can be used.  
  data_format   Optional data format of the image tensor/array. Defaults to None, in which case the global setting tf.keras.backend.image_data_format() is used (unless you changed it, it defaults to "channels_last").   
 


 Returns   Preprocessed numpy.array or a tf.Tensor with type float32. The images are converted from RGB to BGR, then each color channel is zero-centered with respect to the ImageNet dataset, without scaling. 
 

 


 Raises
  ValueError   In case of unknown data_format argument.
Module: tf.keras.applications.vgg19 VGG19 model for Keras. Reference:  
Very Deep Convolutional Networks for Large-Scale Image Recognition (ICLR 2015)  Functions VGG19(...): Instantiates the VGG19 architecture. decode_predictions(...): Decodes the prediction of an ImageNet model. preprocess_input(...): Preprocesses a tensor or Numpy array encoding a batch of images.
tf.keras.applications.vgg19.decode_predictions     View source on GitHub    Decodes the prediction of an ImageNet model.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.keras.applications.vgg19.decode_predictions  
tf.keras.applications.vgg19.decode_predictions(
    preds, top=5
)

 


 Arguments
  preds   Numpy array encoding a batch of predictions.  
  top   Integer, how many top-guesses to return. Defaults to 5.   
 


 Returns   A list of lists of top class prediction tuples (class_name, class_description, score). One list of tuples per sample in batch input.  

 


 Raises
  ValueError   In case of invalid shape of the pred array (must be 2D).
tf.keras.applications.vgg19.preprocess_input     View source on GitHub    Preprocesses a tensor or Numpy array encoding a batch of images.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.keras.applications.vgg19.preprocess_input  
tf.keras.applications.vgg19.preprocess_input(
    x, data_format=None
)
 Usage example with applications.MobileNet: i = tf.keras.layers.Input([None, None, 3], dtype = tf.uint8)
x = tf.cast(i, tf.float32)
x = tf.keras.applications.mobilenet.preprocess_input(x)
core = tf.keras.applications.MobileNet()
x = core(x)
model = tf.keras.Model(inputs=[i], outputs=[x])

image = tf.image.decode_png(tf.io.read_file('file.png'))
result = model(image)

 


 Arguments
  x   A floating point numpy.array or a tf.Tensor, 3D or 4D with 3 color channels, with values in the range [0, 255]. The preprocessed data are written over the input data if the data types are compatible. To avoid this behaviour, numpy.copy(x) can be used.  
  data_format   Optional data format of the image tensor/array. Defaults to None, in which case the global setting tf.keras.backend.image_data_format() is used (unless you changed it, it defaults to "channels_last").   
 


 Returns   Preprocessed numpy.array or a tf.Tensor with type float32. The images are converted from RGB to BGR, then each color channel is zero-centered with respect to the ImageNet dataset, without scaling. 
 

 


 Raises
  ValueError   In case of unknown data_format argument.
Module: tf.keras.applications.xception Xception V1 model for Keras. On ImageNet, this model gets to a top-1 validation accuracy of 0.790 and a top-5 validation accuracy of 0.945. Reference:  
Xception: Deep Learning with Depthwise Separable Convolutions (CVPR 2017)  Functions Xception(...): Instantiates the Xception architecture. decode_predictions(...): Decodes the prediction of an ImageNet model. preprocess_input(...): Preprocesses a tensor or Numpy array encoding a batch of images.
tf.keras.applications.xception.decode_predictions     View source on GitHub    Decodes the prediction of an ImageNet model.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.keras.applications.xception.decode_predictions  
tf.keras.applications.xception.decode_predictions(
    preds, top=5
)

 


 Arguments
  preds   Numpy array encoding a batch of predictions.  
  top   Integer, how many top-guesses to return. Defaults to 5.   
 


 Returns   A list of lists of top class prediction tuples (class_name, class_description, score). One list of tuples per sample in batch input.  

 


 Raises
  ValueError   In case of invalid shape of the pred array (must be 2D).
tf.keras.applications.xception.preprocess_input     View source on GitHub    Preprocesses a tensor or Numpy array encoding a batch of images.  View aliases  Compat aliases for migration 
See Migration guide for more details. tf.compat.v1.keras.applications.xception.preprocess_input  
tf.keras.applications.xception.preprocess_input(
    x, data_format=None
)
 Usage example with applications.MobileNet: i = tf.keras.layers.Input([None, None, 3], dtype = tf.uint8)
x = tf.cast(i, tf.float32)
x = tf.keras.applications.mobilenet.preprocess_input(x)
core = tf.keras.applications.MobileNet()
x = core(x)
model = tf.keras.Model(inputs=[i], outputs=[x])

image = tf.image.decode_png(tf.io.read_file('file.png'))
result = model(image)

 


 Arguments
  x   A floating point numpy.array or a tf.Tensor, 3D or 4D with 3 color channels, with values in the range [0, 255]. The preprocessed data are written over the input data if the data types are compatible. To avoid this behaviour, numpy.copy(x) can be used.  
  data_format   Optional data format of the image tensor/array. Defaults to None, in which case the global setting tf.keras.backend.image_data_format() is used (unless you changed it, it defaults to "channels_last").   
 


 Returns   Preprocessed numpy.array or a tf.Tensor with type float32. The inputs pixel values are scaled between -1 and 1, sample-wise. 
 

 


 Raises
  ValueError   In case of unknown data_format argument.
Module: tf.keras.backend Keras backend API. Functions clear_session(...): Resets all state generated by Keras. epsilon(...): Returns the value of the fuzz factor used in numeric expressions. floatx(...): Returns the default float type, as a string. get_uid(...): Associates a string prefix with an integer counter in a TensorFlow graph. image_data_format(...): Returns the default image data format convention. is_keras_tensor(...): Returns whether x is a Keras tensor. reset_uids(...): Resets graph identifiers. rnn(...): Iterates over the time dimension of a tensor. set_epsilon(...): Sets the value of the fuzz factor used in numeric expressions. set_floatx(...): Sets the default float type. set_image_data_format(...): Sets the value of the image data format convention.