python-kerasHow can I use the applications attribute in TensorFlow Python Keras?
The applications
attribute in TensorFlow Python Keras can be used to quickly and easily create deep learning models. It contains several pre-trained models that are ready to be used in your own applications.
For example, you can use the applications
attribute to quickly and easily create a convolutional neural network model:
from tensorflow.keras.applications import VGG16
model = VGG16()
This code will create a VGG16 convolutional neural network model that is ready to be used.
The applications
attribute contains a list of several pre-trained models, including:
- VGG16
- VGG19
- ResNet50
- InceptionV3
- Xception
- MobileNet
Each of these models can be used to quickly and easily create a deep learning model.
The code to create a model using the applications
attribute is the same for each model. For example, the code to create a ResNet50 model is:
from tensorflow.keras.applications import ResNet50
model = ResNet50()
The output of this code is a ResNet50 model that is ready to be used.
Helpful links
More of Python Keras
- What is Python Keras and how is it used?
- How can I use Python Keras to create a neural network with zero hidden layers?
- How do I use validation_data when creating a Keras model in Python?
- How do I check which version of Keras I am using in Python?
- How do I use Python's tf.keras.utils.get_file to retrieve a file?
- How do I use the to_categorical function in Python Keras?
- How do I set the input shape when using Keras with Python?
- How do I use Python Keras to zip a file?
- How do I save weights in a Python Keras model?
- How do I use the to_categorical function from TensorFlow in Python to convert data into a format suitable for a neural network?
See more codes...