Random Thoughts
  • About
Categories
All (51)
aws (27)
cloudwatch (2)
datasync (1)
dl (5)
docker (4)
efs (2)
fastai (1)
fastpages (1)
jupyter (2)
lambda (3)
lstm (2)
ml (17)
nlp (1)
python (14)
pytorch (9)
s3 (2)
sagemaker (11)
sklearn (1)
synchonization (2)

From Noise to Numbers: A Hands-On Guide to Generating MNIST Digits with Diffusion Models (Part 3)

python
dl
Part 3 dives deep into the core of diffusion models: noise prediction and scheduled denoising. Discover how these crucial techniques enable iterative image generation, starting from random noise. Get hands-on experience and see the impressive results as we finally achieve high-quality MNIST digit synthesis.
Feb 18, 2025
16 min

From Noise to Numbers: A Hands-On Guide to Generating MNIST Digits with Diffusion Models (Part 2)

python
dl
In Part 2 of our diffusion model journey, we supercharge our MNIST digit generator! Building on our basic UNet from Part 1, we introduce the powerful diffusers library and its UNet2DModel. See how this enhanced architecture significantly improves denoising quality through direct image prediction, bringing us closer to clearer, sharper digit generation.
Feb 15, 2025
15 min

From Noise to Numbers: A Hands-On Guide to Generating MNIST Digits with Diffusion Models (Part 1)

python
dl
This post walks you through building MNIST digit generators with diffusion models, starting from the basics. We introduce diffusion models, prepare the MNIST dataset, and train a simple convolutional UNet for direct image prediction. Finally, we evaluate its denoising performance as a foundation for more advanced models.
Feb 10, 2025
29 min

Building a Web Server From Scratch in Pure Python

python
Building a web server from scratch in Python? Join me as I journey from simple http.server to raw sockets, threading, selectors, and asyncio, exploring different concurrency models and benchmarking performance along the way.
Jan 29, 2025
27 min

Unleash Your Creativity: A Rapid Prototyping App with Amazon Nova Canvas

python
aws
Explore the power of Amazon Nova Canvas with a hands-on Streamlit app. This rapid prototyping tool offers five powerful image processing features, including text-to-image, inpainting, and outpainting. Unleash your creativity and transform your ideas into stunning visuals.
Jan 26, 2025
20 min

My Streamlit Deployment Journey on AWS : What Worked, What Didn’t

python
aws
Deploying Streamlit on AWS? I faced WebSocket issues with Lambda and App Runner, found a solution with Lightsail, and built a custom Fargate solution with AWS CDK. This post shares my lessons and cost insights.
Jan 21, 2025
17 min

Streaming Responses in FastAPI

python
In this blog post, I explore how to stream responses in FastAPI using Server-Sent Events, StreamingResponse, and WebSockets. Through simple examples that simulate LLM outputs, I demonstrate how you can efficiently stream real-time data in your applications.
Jan 19, 2025
19 min

Tips to Register for an AWS Certification Exam with Pearson VUE from Pakistan

aws
This blog post provides essential tips for individuals in Pakistan facing challenges with AWS certification exam registration through Pearson VUE. It outlines workarounds for the payment limitations, guides readers through the registration process, and offers insights to successfully navigate the system, ensuring a smooth experience.
May 29, 2023
6 min

AWS Certified Data Analytics Specialty DAS-C01 Notes

aws
I am sharing the notes I used to prepare for the exam.
May 28, 2023
26 min

Build your own Generative AI Art Studio with Amazon SageMaker JumpStart

aws
ml
In this notebook, I demonstrate how to use the SageMaker Jumpstart to generate images from text using state-of-the-art Stable Diffusion models.
May 10, 2023
21 min

Creating an Object Detection Model using Amazon Rekognition Custom Labels

aws
ml
Amazon Rekognition Custom Labels is a feature of Amazon Rekognition that enables customers to build specialized image analysis capabilities to detect unique objects and scenes integral to their specific use case. In this post, we will use this service to train a custom model with a small set of labeled images and use it to analyze new images via an API. This service uses AutoML to train models to find objects, scenes, concepts, object locations, and brand locations in images.
Apr 26, 2023
9 min

Working with partition indexes in AWS Glue

aws
Glue table partition indexes can significantly improve query execution. This post signifies the importance of partition indexes and shows a query performance comparison between tables with partition indexes and without indexes.
Mar 1, 2023
12 min

Implementing AutoEncoder with PyTorch

pytorch
This is a practice notebook to implement AutoEncoder in PyTorch. An autoencoder takes an image as input, stores it in a lower dimension (term encoder), and tries to reproduce the same image as output, hence the term auto. Autoencoders come in handy to identify and group similar images.
Dec 14, 2022
12 min

Implementing Word2Vec with PyTorch

pytorch
nlp
This is a practice notebook to implement word2vec in PyTorch.
Dec 2, 2022
15 min

Generating Text with Recurrent Neural Networks in PyTorch

pytorch
lstm
This is a practice notebook to build a character-level language model with LSTM using PyTorch. We will train a model on an input text, and our goal will be to generate some new text.
Nov 19, 2022
8 min

Predicting the Sentiment of IMDB Movie Reviews using LSTM in PyTorch

pytorch
lstm
This is a practice notebook to work with a dataset of 50,000 movie reviews from the Internet Movie Database (IMDB) and build an LSTM predictor to distinguish between positive and negative reviews.
Nov 9, 2022
9 min

Build Temporal Models for Univariate Time series Data with RNN, GRU, LSTM, CNN using PyTorch

pytorch
dl
This is a practice notebook to understand and build models for time series data. We will explore some popular neural network architectures including RNN, GRU, LSTM, and 1D CNN.
Nov 7, 2022
15 min

Detect Vanishing Gradients in Deep Neural Networks by Plotting Gradient Distributions

pytorch
dl
In this notebook, we will explore how vanishing gradients can affect the training of a deep neural network. We will visualize the gradient flow from the deeper to starting layers during the backpropagation for two popular activation functions, Sigmoid and ReLU.
Oct 23, 2022
11 min

Convolutional Neural Networks Filters and Feature Maps with PyTorch

pytorch
This is a practice notebook for implementing a convolutional neural network (CNN) on the MNIST dataset with PyTorch. We will implement the now famous LeNet-5 from Yann LeCun, a 7-layer CNN from 1989. Then we will explore and visualize the layers learned by our network including filters, feature maps, and output layers.
Oct 18, 2022
10 min

Two Class (Binary) Logistic Regression in Pytorch

pytorch
This is a practice notebook for implementing a two class logistic regression model in PyTorch. We will start by generating some synthetic data and then build an end-to-end pipeline to train a model. We will also see two ways to implement logistic regression models.
Oct 11, 2022
11 min

Linear Regression with PyTorch

pytorch
This is a practice notebook for implementing a linear regression model in PyTorch. We will start by generating some synthetic linear data and then load it into DataLoader class for creating mini-batches. Then build the complete pipeline to train the model and visualize its loss progress in TensorBoard.
Oct 10, 2022
5 min

Train an Image Classifier using Fastai (Deep Dive Analysis)

aws
ml
sagemaker
fastai
This is a practice notebook using the fastai library to build a simple image classifier for cricket, tennis, basketball, and soccer.
Aug 10, 2022
21 min

Building a Feature Repository with SageMaker Feature Store

aws
ml
sagemaker
This notebook demonstrates how to build a central feature repository using Amazon SageMaker Feature Store. Feature Store is used to store, retrieve, and share machine learning features.
Aug 5, 2022
11 min

Deploy Scikit-learn Models to Amazon SageMaker with the SageMaker Python SDK using Script mode

aws
ml
sagemaker
The aim of this notebook is to demonstrate how to train and deploy a scikit-learn model in Amazon SageMaker using script mode.
Jul 7, 2022
20 min

Loading SageMaker Linear Learner Model with Apache MXNet in Python

aws
ml
sagemaker
How to load SageMaker builtin Linear Learner model with Apache MXNet in Python.
Jul 5, 2022
4 min

Serverless Inference with SageMaker Serverless Endpoints

aws
ml
sagemaker
How to call an ML model endpoint hosted by SageMaker using serverless technology.
Jun 17, 2022
9 min

Demystifying Amazon SageMaker Training for scikit-learn Lovers

aws
ml
sagemaker
How to build, train, and deploy a machine learning model with Amazon SageMaker.
Jun 8, 2022
15 min

storemagic - Don’t lose your variables in Jupyter Notebook

jupyter
python
A post on IPython extension ‘storemagic’ to keep your important variables in persistent storage. Use this trick to keep them safe and stop pulling your hair (if there are any left)
May 30, 2022
2 min

Data Preparation with SageMaker Data Wrangler (Part 5)

aws
ml
sagemaker
A detailed guide on AWS SageMaker Data Wrangler to prepare data for machine learning models. This is a five parts series where we will prepare, import, explore, process, and export data using AWS Data Wrangler. You are reading Part 5:Export data for ML training.
May 26, 2022
3 min

Data Preparation with SageMaker Data Wrangler (Part 4)

aws
ml
sagemaker
A detailed guide on AWS SageMaker Data Wrangler to prepare data for machine learning models. This is a five parts series where we will prepare, import, explore, process, and export data using AWS Data Wrangler. You are reading Part 4:Preprocess data using Data Wrangler.
May 25, 2022
4 min

Data Preparation with SageMaker Data Wrangler (Part 3)

aws
ml
sagemaker
A detailed guide on AWS SageMaker Data Wrangler to prepare data for machine learning models. This is a five parts series where we will prepare, import, explore, process, and export data using AWS Data Wrangler. You are reading Part 3:Explore data with Data Wrangler visualizations.
May 24, 2022
3 min

Data Preparation with SageMaker Data Wrangler (Part 2)

aws
ml
sagemaker
A detailed guide on AWS SageMaker Data Wrangler to prepare data for machine learning models. This is a five parts series where we will prepare, import, explore, process, and export data using AWS Data Wrangler. You are reading Part 2:Import data from multiple sources using Data Wrangler.
May 23, 2022
4 min

Collecting metrics and logs from on-premises servers with the CloudWatch agent

aws
cloudwatch
A detailed guide on using cloudwatch agent to collect logs and metrics from an on-premises Ubuntu server.
May 21, 2022
6 min

Data Preparation with SageMaker Data Wrangler (Part 1)

aws
ml
sagemaker
A detailed guide on AWS SageMaker Data Wrangler to prepare data for machine learning models. This is a five parts series where we will prepare, import, explore, process, and export data using AWS Data Wrangler. You are reading Part 1:Prepare synthetic data and place it on multiple sources.
May 17, 2022
5 min

AWS Machine Learning Certification Notes (MLS-C01)

aws
ml
My notes for AWS ML speciality exam passed on May 14, 2022.
May 14, 2022
11 min

Kaggle - Blue Book for Bulldozers

ml
blue book
Apr 25, 2022
18 min

Docker - Send Container Logs to AWS CloudWatch

docker
python
aws
cloudwatch
A tutorial on sending docker application logs to aws cloudwatch.
Apr 11, 2022
7 min

Machine Learning Nomenclature

ml
A collection of machine learning terminologies
Mar 31, 2022
4 min

AWS EFS Sync to S3 Using DataSync

aws
lambda
efs
s3
synchonization
datasync
A tutorial to synchronize EFS with S3 bucket using DataSync service.
Mar 29, 2022
8 min

AWS EFS Sync to S3 Using Lambda

aws
lambda
efs
s3
synchonization
A tutorial on synchronizing EFS with S3 bucket using a Lambda function.
Mar 28, 2022
10 min

AWS Lambda - Test and Debug Locally in Visual Studio Code

aws
lambda
docker
A tutorial on testing and debugging AWS Lambda function from Visual Studio Code.
Mar 16, 2022
8 min

Docker - Debugging Python Application

docker
python
A tutorial on debugging Python application running on Docker inside WSL2.
Mar 14, 2022
6 min

Docker - Accessing Python Application Logs

docker
python
A tutorial on getting Python application logs running on Docker inside WSL2.
Mar 11, 2022
8 min

Sklearn Pipeline and Transformers Deep Dive

ml
sklearn
A detailed tutorial on Sklearn Pipeline, ColumnTransformer, FunctionTransformer, and a custom transformer.
Mar 4, 2022
12 min

AWS CloudFormation Template, Functions, and Commands

aws
Some useful notes on AWS CloudFormation template sections, intrinsic functions, and other tips.
Feb 28, 2022
11 min

AWS IAM Policy Types

aws
A summary of different AWS IAM policies.
Feb 23, 2022
3 min

AWS DNS Records - A, CNAME, ALIAS, & MX

aws
A summary of differences between AWS Route53 DNS Records
Feb 22, 2022
4 min

Python - A collection of output formatting tips

python
Some handy Python output tips
Feb 18, 2022
1 min

Python - Getting more information from Tracebacks

python
A tutorial to get more information from Python exception stack traceback.
Feb 11, 2022
5 min

Python Dictionary - Multiple ways to get items

python
A tutorial on multiple ways to get items from a Python dictionary.
Feb 10, 2022
2 min

My First Blog Post from Jupyter Notebook

jupyter
fastpages
Trying to check if everything is working as intended
Feb 9, 2022
1 min
No matching items