Text Classification Using FNet in Python with Keras

Text Classification Using FNet in Python with Keras

I’ve spent the last four years building deep learning models, and one thing I’ve realized is that Transformers can be quite heavy on resources. Recently, I’ve been experimenting with FNet, a model that replaces the complex self-attention layer with a simple Fourier Transform. In this guide, I’ll show you exactly how I use FNet for … Read more >>

Object Detection with YOLOv8 and KerasCV in Keras

Object Detection with YOLOv8 and KerasCV in Keras

I have spent years building computer vision pipelines, and I can tell you that YOLOv8 combined with KerasCV is a game-changer. It simplifies the process of building high-performance models while keeping your code clean and readable. In this tutorial, I will show you exactly how to implement object detection. We will move away from generic … Read more >>

Implement Masked Image Modeling with Keras Autoencoders

Masked Image Modeling with Keras Autoencoders

I’ve often found that the best way for a model to “learn” an image is by trying to fix a broken one. Masked Image Modeling (MIM) is a fascinating technique where we intentionally hide parts of an image and ask an Autoencoder to reconstruct the missing pieces. I remember the first time I applied this … Read more >>

Ways to Split a String into Equal Parts in Python

split string in half python

During my decade of working with Python, I’ve often had to break down large strings into manageable chunks. Whether I was processing social security numbers or formatting large batches of California zip codes, this task comes up more often than you’d think. In this tutorial, I’ll show you the most efficient ways to split a … Read more >>

How to Split a String by Index in Python

python split string by index

In my years of developing Python applications, I’ve often come across situations where the standard split() method just doesn’t cut it. Sometimes, you don’t have a delimiter like a comma or a space to rely on. You simply need to cut a string at a specific position. Whether you are parsing fixed-width data files or … Read more >>

React Component Hierarchy Diagrams

React Component Hierarchy Diagrams

When I first started building React applications over eight years ago, I often dove straight into coding without a clear plan. I soon realized that skipping the architectural phase led to “prop drilling” nightmares and messy, unmaintainable codebases. Visualizing your components before you write a single line of JSX is the secret to building scalable, … Read more >>

React Router Link Component

React Router Link Component

In my eight years of building React applications, I’ve found that one of the most critical parts of the user experience is how they move between pages. If you are coming from traditional HTML, you might be used to the standard anchor tag (<a>) for navigation. However, in the world of Single Page Applications (SPAs), … Read more >>

Image Classification Using Keras Forward-Forward Algorithm

Image Classification Using Keras Forward-Forward Algorithm

Over my four years as a Keras developer, I have spent countless hours debugging backpropagation gradients. It is often frustrating when gradients vanish or explode during deep network training. Recently, I started experimenting with Geoffrey Hinton’s Forward-Forward (FF) algorithm as a powerful alternative. It replaces the traditional backward pass with two forward passes, one with … Read more >>

Focal Modulation vs Self-Attention in Keras

Focal Modulation vs. Self-Attention in Keras

If you have been building vision models with Keras, you likely know that Self-Attention is the “gold standard” for capturing long-range dependencies. However, after four years of scaling these models, I have found that Self-Attention often struggles with high-resolution images because its complexity grows quadratically with the number of pixels. Recently, I started using Focal … Read more >>

Knowledge Distillation for Vision Transformers in Keras

Knowledge Distillation for Vision Transformers in Keras

I have spent the last four years building deep learning pipelines, and one thing is clear: Vision Transformers (ViT) are incredibly powerful but often too bulky for real-time applications. In this tutorial, I will show you how to use Keras to distill the knowledge from a large ViT model into a much smaller, faster neural … Read more >>