Hello, my name is Nizar Dajani, and in these lessons, you will learn about Keras, the ano, light gbm, xgboost, and catboost. And in this lesson, you will learn about Keras. Keras is a high-level neural networks API written in Python. It serves as an interface for TensorFlow, the ano, and Microsoft cognitive toolkit deep learning frameworks. Keras was designed with a focus on user-friendliness, modularity, and extensibility, making it a popular choice for both beginners and experienced deep learning practitioners. It provides a simple and consistent way to define and train neural networks, abstracting away many of the low-level details of working with deep learning frameworks. Keras offers a wide range of prebuilt layers, optimizers, loss functions, and tools for building and training neural networks. It also supports both CPU and GPU computation, allowing users to leverage hardware acceleration for faster training. Keras has been an integral part of TensorFlow since version 2.0, making it the recommended high-level API for building and training deep learning models within the TensorFlow ecosystem. The story of Keras and its relationship with TensorFlow is an interesting one in the world of deep learning and neural networks. Keras, developed by Francois Chole, was initially an independent deep learning framework in its own right, designed to be user-friendly and highly modular. It gained popularity for its simplicity and ease of use in creating and training neural networks. So here's a chronological overview of the story and how Keras became closely associated with TensorFlow. Keras was originally developed as an independent open-source project in 2015. It aimed to provide a high-level user-friendly API for building and training neural networks. It had its own set of backends, which included the nano and TensorFlow, to handle the lower-level computations. Now, TensorFlow, which is an open-source machine learning framework developed by Google, was gaining prominence in the deep learning community. Google began to recognize TensorFlow's popularity and the need for more unified ecosystems, so it decided to bring Keras into the TensorFlow fold. And so in 2017, Keras was officially integrated as the high-level API of choice for building neural networks within TensorFlow. And Francois Choli joined the TensorFlow team at Google, and Keras became a key component of the TensorFlow library. Now, this integration had several advantages. First, it simplified the deep learning landscape by providing a consistent and user-friendly interface for building models. Second, it allowed users to leverage the full power of TensorFlow, including its distributed computing capabilities, while still using Keras high-level abstractions. Keras within TensorFlow quickly became the recommended and user-friendly way to work with deep learning models. It made it easier for researchers, developers, and data scientists to experiment with and deploy deep learning solutions. As a result, Keras saw widespread adoption in the community. And after becoming part of TensorFlow, Keras continued to evolve, benefiting from the resources and contributions within the TensorFlow ecosystem. Francois Choli and the TensorFlow team worked together to improve and expand the Keras API, and in 2019, TensorFlow 2.0 was released and it featured tighter integration with Keras, and made Keras the default high-level API for building models. This released further solidified the partnership between Keras and TensorFlow. And today, when people refer to Keras, they're often referring to TF.kiras, which is the Keras API integrated into TensorFlow. This union of user-friendliness and powerful capabilities has made Keras one of the most popular and accessible tools for working with deep learning, bridging the gap between researchers and practitioners in the field. So let's take a look at an example of Keras in a Python code. We start by importing the TensorFlow library and its Keras module. This code assumes you have TensorFlow and Keras already installed. We then load the MNIST dataset, which is a popular dataset for handwritten-digit classification. The dataset contains images of handwritten digits along with their corresponding labels. Next, we preprocess the data by scaling the pixel values in the image data to arrange between 0 and 1. This normalization helps the neural network learn more effectively. Next, we build a simple neural network model, so we create a sequential model using Keras. This model is like a stack of layers. The first layer, layers.flatten, transform the 28 by 28 pixel images into a flat vector of 784 values. The next layer is a dense layer with 128 neurons, and the relu, or the rectified linear unit, activation function. A dropout layer is added to reduce overfitting. It randomly deactivates 20% of the neurons during training. Then, the final layer is another dense layer with 10 neurons, one for each digit, and a softmax activation function, which assigns probabilities to each class. Next, we compile the model with the atom optimizer, use the sparse categorical cross entropy as the loss function, which is suitable for classification problems. Then, we have accuracy as the evaluation metric. Then, we train the model using the model's fit function. Our training data is X-train and Y-train, for 5 epochs. An epoch is a single pass through the entire training dataset. After training, we use the model.evaluate function to evaluate the model's performance on the test data, which is X-test and Y-test. Then, we print out the test accuracy and test loss. So, let's run this code and see what we get back. The output of this code includes the training process, the test accuracy, and test loss. During training, you'll see updates for each epoch, showing the loss and accuracy on the training data. The model is trying to learn from the training data to make accurate predictions. And the final output line, which is printed after training, displays the test accuracy and test loss. This accuracy represents the model's ability to correctly classify unseen and written digits in the test dataset. In this example, the model achieves a test accuracy of this number, meaning it can correctly identify nearly this much percent of the digits in the test dataset. This is a strong performance, especially considering it's a basic model trained for just a few epochs. So, in this lesson, you learned about Quiros. In the next lesson, you learned about theano. Thanks for watching.