Create Subplots with a Secondary Y-Axis in Matplotlib

Create Subplots with Secondary Y-Axis in Matplotlib

When I build dashboards for financial analysis, I often need to compare two different metrics that don’t share the same scale. For instance, you might want to visualize the S&P 500 index price alongside the daily trading volume. If you plot them on the same Y-axis, the volume (in millions) will completely flatten the index … Read more >>

How to Set Axis Lower Limit in Matplotlib

Set Axis Lower Limit in Matplotlib

In my years of developing data-driven applications in Python, I’ve found that Matplotlib’s default scaling is usually great, but it isn’t perfect. There are many times when the default view starts the axis at a value that hides the trend you are trying to highlight. I often find myself needing to force a plot to … Read more >>

Set the Secondary Axis Range in Python Matplotlib

Secondary Axis Range in Matplotlib

One of the most common challenges I face when building complex data visualizations is managing scales. Sometimes, a single Y-axis just doesn’t tell the whole story. In my experience, adding a secondary axis is the best way to compare two different data scales on a single chart. However, getting the range right can be tricky. … Read more >>

Set Axis Range in Python Matplotlib imshow

Axis Range in Matplotlib imshow

I have spent years visualizing complex datasets using Matplotlib, and one of the most common hurdles I see developers face is handling the axis range in imshow. By default, Matplotlib treats your array indices as coordinates, which rarely matches the real-world scale of your data. In this tutorial, I will show you exactly how to … 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 >>

Supervised Consistency Training in Keras

Supervised Consistency Training in Keras

Training deep learning models that generalize well to real-world data can be a real challenge. In my four years of working with Keras, I’ve found that supervised consistency training is a game-changer for model stability. This technique ensures that your model produces similar predictions even when the input data undergoes slight variations or noise. In … Read more >>

Implement Barlow Twins for Contrastive SSL in Keras

Implement Barlow Twins for Contrastive SSL in Keras

I have spent a lot of time working with Keras and deep learning models. One of the most interesting challenges is training models when you do not have enough labeled data. In my experience, self-supervised learning is the best way to handle this. It allows the model to learn useful features from images without needing … Read more >>

51 Python Programs

51 PYTHON PROGRAMS PDF FREE

Download a FREE PDF (112 Pages) Containing 51 Useful Python Programs.

pyython developer roadmap

Aspiring to be a Python developer?

Download a FREE PDF on how to become a Python developer.

Let’s be friends

Be the first to know about sales and special discounts.