Server Side Programming Articles

Page 427 of 2109

Breadth First Search on Matrix in Python

Dev Prakash Sharma
Dev Prakash Sharma
Updated on 25-Mar-2026 2K+ Views

Breadth First Search (BFS) on a matrix finds the shortest path between two cells by exploring neighbors level by level. In a 2D matrix, each cell can move in four directions: left, right, up, and down. Matrix Cell Types In BFS matrix problems, cells are typically represented by different values ? 0 − Blocked cell (cannot move through) 1 − Open cell (can move through) 2 − Source cell (starting point) 3 − Destination cell (target point) BFS Algorithm for Matrix The algorithm uses a queue to explore cells level by level ? ...

Read More

Balanced Binary Tree in Python

Dev Prakash Sharma
Dev Prakash Sharma
Updated on 25-Mar-2026 5K+ Views

In a binary tree, each node contains two children, i.e left child and right child. Let us suppose we have a binary tree and we need to check if the tree is balanced or not. A Binary tree is said to be balanced if the difference of height of left subtree and right subtree is less than or equal to 1. Problem Examples Example 1 - Balanced Tree 1 2 ...

Read More

Python Pandas - Read data from a CSV file and print the 'product' column value that matches 'Car' for the first ten rows

Vani Nalliappan
Vani Nalliappan
Updated on 25-Mar-2026 1K+ Views

When working with CSV data in Pandas, you often need to filter specific rows based on column values. This tutorial shows how to read a CSV file and filter rows where the 'product' column matches 'Car' from the first ten rows. We'll use the 'products.csv' file which contains 100 rows and 8 columns with product information. Sample Data Structure The products.csv file contains the following structure ? Rows: 100 Columns: 8 id product engine avgmileage price height_mm width_mm productionYear 1 2 ...

Read More

How can Tensorflow be used to compose layers using Python?

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 302 Views

TensorFlow allows you to compose layers by creating custom models that inherit from tf.keras.Model. This approach enables you to build complex architectures like ResNet identity blocks by combining multiple layers into reusable components. Understanding Layer Composition Layer composition in TensorFlow involves creating custom models that encapsulate multiple layers. This is particularly useful for building residual networks where you need to combine convolutional layers, batch normalization, and skip connections into a single reusable block. Creating a ResNet Identity Block Here's how to compose layers by creating a ResNet identity block that combines multiple convolutional and batch normalization ...

Read More

How can Tensorflow be used to plot the results using Python?

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 460 Views

TensorFlow can be used to plot results using the matplotlib library and imshow method. This is particularly useful for visualizing predictions from image classification models and displaying multiple images in a grid format. Read More: What is TensorFlow and how Keras work with TensorFlow to create Neural Networks? Transfer Learning and Visualization Transfer learning allows us to use pre-trained models from TensorFlow Hub for image classification without training from scratch. The intuition behind transfer learning is that if a model is trained on a large and general dataset, it can serve as a generic model for the ...

Read More

How can Tensorflow be used to check the predictions using Python?

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 436 Views

TensorFlow can be used to check predictions using the predict() method and NumPy's argmax() method. This approach is commonly used in image classification tasks where you need to determine the most likely class for input data. Read More: What is TensorFlow and how Keras work with TensorFlow to create Neural Networks? The intuition behind transfer learning for image classification is that if a model is trained on a large and general dataset, this model can effectively serve as a generic model for the visual world. It learns feature maps, meaning you don't have to start from scratch by ...

Read More

How can Tensorflow be used to visualize the loss versus training using Python?

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 332 Views

TensorFlow can be used to visualize the loss versus training using the matplotlib library and plot method to plot the data. This visualization helps monitor training progress and detect issues like overfitting. Read More: What is TensorFlow and how Keras work with TensorFlow to create Neural Networks? A neural network that contains at least one layer is known as a convolutional layer. We can use the Convolutional Neural Network to build learning model. The intuition behind transfer learning for image classification is, if a model is trained on a large and general dataset, this model can be ...

Read More

How can Tensorflow be used to fit the data to the model using Python?

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 272 Views

TensorFlow can be used to fit data to a model using the fit() method. This method trains a neural network by iterating through the dataset for a specified number of epochs. Read More: What is TensorFlow and how Keras work with TensorFlow to create Neural Networks? Understanding Transfer Learning A neural network that contains at least one convolutional layer is called a Convolutional Neural Network (CNN). We can use CNNs to build effective learning models. The intuition behind transfer learning for image classification is that if a model is trained on a large and general dataset, ...

Read More

How can Tensorflow be used to attach a classification head using Python?

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 480 Views

TensorFlow can be used to attach a classification head using a sequential model that contains a Dense layer and a pre-defined feature extractor model. This process is essential in transfer learning where we leverage pre-trained models and add custom classification layers. Read More: What is TensorFlow and how Keras work with TensorFlow to create Neural Networks? What is Transfer Learning? Transfer learning allows us to use pre-trained models as feature extractors. A model trained on a large dataset like ImageNet has already learned useful feature representations, so we don't need to train from scratch. TensorFlow Hub ...

Read More

How can Tensorflow be used to extract features with the help of pre-trained model using Python?

AmitDiwan
AmitDiwan
Updated on 25-Mar-2026 992 Views

TensorFlow can be used to extract features with the help of pre-trained models using a feature extractor model, which is previously defined and is used in the KerasLayer method. This approach leverages transfer learning to utilize knowledge from models trained on large datasets. Read More: What is TensorFlow and how Keras work with TensorFlow to create Neural Networks? Understanding Transfer Learning The intuition behind transfer learning for image classification is that if a model is trained on a large and general dataset, this model can effectively serve as a generic model for the visual world. It learns ...

Read More
Showing 4261–4270 of 21,090 articles
« Prev 1 425 426 427 428 429 2109 Next »
Advertisements