Git is currently the most popular version control system. A version control system records the changes made to our project codebase in a special kind of file system-based database. In Git, this database is known as a repository and its structure is inspired by the Linux file system. The repository maintains a history of the changes to our codebase.The .git folder contains all information that is necessary for the project and all information relating commits, remote repository address, etc. It also contains a log that stores the commit history. This log can help you to roll back to the desired ... Read More
The default configuration should be modified when you use Git for the first time. The git config command can be used to achieve the same. The following are some Git configuration settings that can be set −NameEmailDefault EditorLine EndingsGit allows us to configure the above settings at different levels. This means we can have different settings for different repositories of different projects. All configurations are stored in a configuration file.SyntaxThe syntax to modify Git’s configuration is −git config configuration_name [additional_flags]Git configuration can be modified at the following levels −System − System−level configuration is applied across an entire machine and ... Read More
Functions are building blocks of code. They allow us to avoid writing similar code and also help in organizing large section of code into reusable components.In Rust, functions can be found everywhere. Even function definitions are also statements in Rust.One of the most important function in Rust is the main function, which is the entry point of any software or application.We make use of the fn keyword to declare a function in Rust.In Rust, the names of the functions make use of snake case as the conventional style. In snake case, all the letters of the word are in lower ... Read More
The model can be trained using the ‘train’ method in Tensorflow, where the epochs (number of times the data has to be trained to fit the model) and the training data are specified.Read More: What is TensorFlow and how Keras work with TensorFlow to create Neural Networks?We are using the Google Colaboratory to run the below code. Google Colab or Colaboratory helps run Python code over the browser and requires zero configuration and free access to GPUs (Graphical Processing Units). Colaboratory has been built on top of Jupyter Notebook.print("The model is being trained") epochs=12 history = model.fit( train_ds, ... Read More
The created model in Tensorflow can be compiled using the ‘compile’ method. The loss is calculated using the ‘SparseCategoricalCrossentropy’ method.Read More: What is TensorFlow and how Keras work with TensorFlow to create Neural Networks?We are using the Google Colaboratory to run the below code. Google Colab or Colaboratory helps run Python code over the browser and requires zero configuration and free access to GPUs (Graphical Processing Units). Colaboratory has been built on top of Jupyter Notebook.print("The model is being compiled") model.compile(optimizer='adam', loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True), metrics=['accuracy']) print("The architecture of the model") model.summary()Code credit: https://www.tensorflow.org/tutorials/images/classificationOutputThe model is being compiled The architecture of the ... Read More
A sequential model can be created using the ‘Sequential’ API that uses the ‘ layers.experimental.preprocessing.Rescaling’ method. The other layers are specified while created the model.Read More: What is TensorFlow and how Keras work with TensorFlow to create Neural Networks?We will use the Keras Sequential API, which is helpful in building a sequential model that is used to work with a plain stack of layers, where every layer has exactly one input tensor and one output tensor.We are using the Google Colaboratory to run the below code. Google Colab or Colaboratory helps run Python code over the browser and requires zero ... Read More
We will be using the flowers dataset, which contains images of several thousands of flowers. It contains 5 sub-directories, and there is one sub-directory for every class. Once the flower dataset has been downloaded using the ‘get_file’ method, it will be loaded into the environment to work with it.The flower data can be standardized by introducing a normalization layer in the model. This layer is called the ‘Rescaling’ layer, which is applied to the entire dataset using the ‘map’ method.Read More: What is TensorFlow and how Keras work with TensorFlow to create Neural Networks?We are using the Google Colaboratory to ... Read More
Let's say we have flower dataset. The flower dataset can be downloaded using a google API that basically links to the flower dataset. The ‘get_file’ method can be used to pass the API as a parameter. Once this is done, the data gets downloaded into the environment.It can be visualized using the ‘matplotlib’ library. The ‘imshow’ method is used to display the image on the console. Read More: What is TensorFlow and how Keras work with TensorFlow to create Neural Networks?We will use the Keras Sequential API, which is helpful in building a sequential model that is used to work with ... Read More
The flower dataset can be configured for performance with the help of buffer prefetch, shuffle method, and cache method. Buffered prefetching can be used to ensure that the data can be taken from disk without having I/O become blocking. Dataset.cache() keeps the images in memory after they have been loaded off disk during the first epoch. Dataset.prefetch() will overlap the data preprocessing and model execution while training.Read More: What is TensorFlow and how Keras work with TensorFlow to create Neural Networks?The Keras Sequential API is used, which is helpful in building a sequential model that is used to work with ... Read More
The flower dataset can be pre-processed using the keras preprocessing API. It has a method named ‘image_dataset_from_directory’ that takes the validation set, the directory where data is stored, and other parameters to process the dataset.Read More: What is TensorFlow and how Keras work with TensorFlow to create Neural Networks?We will use the Keras Sequential API, which is helpful in building a sequential model that is used to work with a plain stack of layers, where every layer has exactly one input tensor and one output tensor. An image classifier is created using a keras.Sequential model, and data is loaded using ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP