Deep learning is a branch of machine learning, in essence, its the implementation of neural networks with more than a single hidden layer of neurons.
AI, ML, DL (Pic credits: Pinterest)
In this article, I’m going to cover the top 5 Deep Learning Libraries & Frameworks.
Here you go —
Developed by François Chollet, a researcher at Google, Keras is a Python framework for deep learning.
Keras has been used at organizations like Google, CERN, Yelp, Square, Netflix, and Uber. The advantage of Keras is that it uses the same Python code to run on CPU or GPU.
Keras models accept three types of inputs:
keras.utils.Sequence
class).Keras features a range of utilities to help you turn raw data on disk into a Dataset:
tf.keras.preprocessing.image_dataset_from_directory
— It turns image files sorted into class-specific folders into a labeled dataset of image tensors.tf.keras.preprocessing.text_dataset_from_directory
— It turns text files sorted into class-specific folders into a labeled dataset of text tensors.In Keras, layers are simple input-output transformations. For the preprocessing layers itincludes:
TextVectorization
layerNormalization
layerExample —
from tensorflow.keras import layers
# Center-crop images to 150x150
x = CenterCrop(height=150, width=150)(inputs)
# Rescale images to [0, 1]
x = Rescaling(scale=1.0 / 255)(x)
# Apply some convolution and pooling layers
x = layers.Conv2D(filters=32, kernel_size=(3, 3), activation="relu")(x)
x = layers.MaxPooling2D(pool_size=(3, 3))(x)
x = layers.Conv2D(filters=32, kernel_size=(3, 3), activation="relu")(x)
x = layers.MaxPooling2D(pool_size=(3, 3))(x)
x = layers.Conv2D(filters=32, kernel_size=(3, 3), activation="relu")(x)
# Apply global average pooling to get flat feature vectors
x = layers.GlobalAveragePooling2D()(x)
# Add a dense classifier on top
num_classes = 10
outputs = layers.Dense(num_classes, activation="softmax")(x)
#keras #machine-learning #tensorflow #deep-learning #tech #deep learning