Skip to main content

Posts

Featured Post

5G Network Simulation in NS3 using mmWave | NS3 Tutorial 2024

Recent posts

Download VM Image of NS3 and Contiki NG

Dear Learners, Good day. I have created a Virtual Machine Image with all the software modules in built in this Ubuntu 18.04 OS. You just need to do the following steps.  Software Included in this Virtual Machine network Simulator 3 Gnuplot Wireshark Contiki NG Java Compiler Tracemetrics COOJA Simulator for IoT Assume You have a Windows Machine.  Step 1:  Download the VMWare Workstation Player from this link https://www.vmware.com/go/getplayer-win Install the Software in your Machine. Step 2:  Download the VM Image from the following link, the total size of the file is around 4.6GB. http://www.mediafire.com/file/3itf14zxb7gclp4/Ubuntu1804.rar Step 3:  Extract the above rar file into your D drive or E Drive Preferrably (As the total size may exceed 15GB).  So do not extract it in the C Drive. Step 4:  Open your VMWare Workstation player and Click " Open a Virtual Machine " as shown in the Figure given below. And then Go to the place where you extracted t...

Transfer Learning with PyTorch: Classifying Ants and Bees Using ResNet18

Transfer Learning Transfer learning is a powerful technique in deep learning that allows us to leverage pre-trained models to solve new tasks with limited data. In this blog post, we’ll walk through a practical example of transfer learning using PyTorch. We’ll fine-tune a pre-trained ResNet18 model to classify images of ants and bees from the Hymenoptera dataset, downloaded from Kaggle. By the end, you’ll understand how to set up the dataset, apply data transformations, train the model, and visualize predictions—all with a few lines of code! What is Transfer Learning? Transfer learning involves taking a model trained on a large, general dataset (like ImageNet) and adapting it to a specific task. Instead of training a neural network from scratch, which requires massive data and computing resources, we start with a pre-trained model and tweak it for our needs. This approach is especially useful when working with small datasets, as it reduces training time and the need for extensive lab...

Building AlexNet from Scratch with PyTorch: A Step-by-Step Guide

Building AlexNet from Scratch with PyTorch In the world of deep learning, AlexNet holds a special place as a groundbreaking convolutional neural network (CNN) that won the ImageNet Large Scale Visual Recognition Challenge (ILSVRC) in 2012. Developed by Alex Krizhevsky, Ilya Sutskever, and Geoffrey Hinton, it demonstrated the power of deep learning and GPUs for image classification. In this blog post, we’ll implement AlexNet from scratch using PyTorch, explore its architecture, and provide a working code example. What is AlexNet? AlexNet is a deep CNN designed to classify images into 1000 categories. It features five convolutional layers, three max-pooling layers, and three fully connected layers, with ReLU activations and dropout for regularization. Its innovative use of large kernels, overlapping pooling, and GPU acceleration made it a milestone in computer vision. Let’s dive into the implementation! Prerequisites Before running the code, ensure you have the following installed:...

CNN with MNIST using PyTorch

CNN with MNIST using PyTorch Implement a  CNN  using PyTorch for the  FashionMNIST  Dataset and  MNIST  Dataset for the following hyperparameter change: the epochs. Plot Accuracy for 2, 4, 6, 8, and 10 Epochs and print the sample images as per the source code. The following code contains only two Conv layers; in your design, you need to add one extra layer, make it 3, and perform the above experiment.  What is the minimum number of epochs for which the image prediction is maximum?  Implementing a CNN with PyTorch for MNIST and FashionMNIST: Hyperparameter Tuning with Epochs Introduction to CNNs with PyTorch, MNIST, and FashionMNIST Convolutional Neural Networks (CNNs) are a cornerstone of deep learning, especially for image classification tasks. In this blog post, we’ll explore how to implement a CNN using PyTorch for two popular datasets: MNIST (handwritten digits) and FashionMNIST (clothing items). We’ll enhance a basic CNN architecture by a...

How to Install NS-3.44 on Ubuntu 24.04: A Step-by-Step Guide

  Prerequisites for Installing NS-3.44 on Ubuntu 24.04 Before diving into the installation, ensure your system meets the following requirements: Operating System : Ubuntu 24.04 LTS Internet Connection : Required for downloading dependencies and NS-3 source code Disk Space : At least 5 GB of free space RAM : Minimum 4 GB (8 GB recommended for more extensive simulations) You’ll also need administrative access (sudo) to install packages. See the following video for the complete instructions: Step-by-Step Guide to Install NS-3.44 on Ubuntu 24.04 Follow these steps carefully to set up NS-3.44 on your system. Step 1: Update Your System First, ensure your Ubuntu 24.04 system is up to date. Open a terminal (Ctrl + Alt + T) and run: $ sudo apt update && sudo apt upgrade -y Step 2: Install Required Dependencies NS-3.44 requires several development tools and libraries. Install them with the following command: $ sudo apt install g++ python3 cmake ninja-build git gir1.2-goo...

How to run python files in ns3 | Python Bindings

ns3 installation with Python bindings Yes, you can easily run Python scripts of ns3 using this technique Follow the video for more instructions. Steps We are going to install ns-3.43 on this machine now. We already have Ubuntu 24.04 os  1. go to https://www.nsnam.org and download the latest ns3 software. 2. Give these commands one after the other $ sudo apt update $ sudo apt install g++ python3 cmake ninja-build git gir1.2-goocanvas-2.0 python3-gi python3-gi-cairo python3-pygraphviz gir1.2-gtk-3.0 ipython3 tcpdump wireshark sqlite3 libsqlite3-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools openmpi-bin openmpi-common openmpi-doc libopenmpi-dev doxygen graphviz imagemagick python3-sphinx dia imagemagick texlive dvipng latexmk texlive-extra-utils texlive-latex-extra texlive-font-utils libeigen3-dev gsl-bin libgsl-dev libgslcblas0 libxml2 libxml2-dev libgtk-3-dev lxc-utils lxc-templates vtun uml-utilities ebtables bridge-utils libxml2 libxml2-dev libboost-all-dev ccache python3-...

How to install python3 on Ubuntu | Setting Up Your Dev Environment

This post will show how to install python3 and pip in Ubuntu 24.04 OS. This post also shows how to overcome the externally managed environment error $ sudo apt install python3-full python3 python3-pip If you get this error,  error: externally-managed-environment, then you need to create a virtual environment for Python and get things done... Python3 error So here is the step to do that $ python3 -m venv ./pradeep $ source ./pradeep/bin/activate activate is common for Ubuntu/Fedora, activate.fish to be used in Arch Linux  I tried to install a notebook $ pip install notebook so whenever you start running python3 and pip, use this command  $ source ./pradeep/bin/activate For complete details, watch the following video Thats it. Subscribe to my channel for more such videos. Source Codes: https://github.com/tspradeepkumar  My other Channel -  https://www.youtube.com/tspradeepkumar​   My Tech Blog - https://www.nsnam.com/ My Personal webiste - https://www.pr...