😅 I Thought My Model Was Working… Until It Wasn’t
When I built my first CNN model for brain tumor classification using MRI images, I felt confident.
- The code was running
- Accuracy looked good
- Predictions were coming
The model classified images into:
- Glioma
- Meningioma
- Pituitary
- No Tumor
Everything seemed fine… until I looked closer.
👉 The model wasn’t learning what I thought it was.
Here are the 5 mistakes that taught me more than any tutorial.
❌ Mistake 1: Ignoring Class Distribution
I didn’t properly check:
- How many images per class?
- Whether all 4 classes were balanced?
👉 Result:
The model became biased toward dominant classes.
It looked accurate—but struggled on minority classes.
🖼️ Class Imbalance Problem
👉 Lesson:
In multi-class problems, imbalance is even more dangerous than binary cases.
❌ Mistake 2: Increasing Model Complexity Without Reason
I assumed:
“More layers = better classification across all 4 classes”
So I kept adding layers.
👉 Result:
- Training accuracy increased
- Validation performance dropped
📉 Overfitting in Multi-Class Model
👉 Lesson:
A complex model doesn’t guarantee better class separation.
❌ Mistake 3: Trusting Overall Accuracy
My model showed decent accuracy.
I thought:
“It’s working well.”
But I didn’t check:
- Class-wise performance
- Confusion between similar tumor types
👉 Result:
The model confused:
- Glioma vs Meningioma
- Pituitary vs others
👉 Lesson:
In multi-class problems, overall accuracy hides real problems.
❌ Mistake 4: Copying Hyperparameters Blindly
I copied:
- Learning rate
- Epochs
- Batch size
Without understanding their effect.
👉 Result:
- Some classes learned faster
- Others were poorly classified
👉 Lesson:
Hyperparameters affect each class differently in multi-class models.
❌ Mistake 5: Not Visualizing MRI Data Early
I didn’t spend enough time looking at:
- Differences between tumor types
- Visual patterns in MRI scans
🧠 What I Should Have Observed
👉 Lesson:
Some classes look visually similar—your model struggles for the same reason.
🧠 What Changed After These Mistakes
After fixing these:
- I started checking class-wise performance
- I simplified the model
- I focused more on data understanding
👉 Biggest realization:
Multi-class classification is not just “more classes”—it’s more complexity.
💬 Final Thought
If you're working on a CNN for multi-class classification, don’t rely on accuracy alone.
👉 Ask:
- Which class is failing?
- Why is it failing?
🔗 Part of My CNN Learning Series
- 🧠 My first experience → (https://dev.to/tanmayt134/what-my-first-cnn-project-taught-me-3om7)
- ⚠️ Mistakes → (this post)
- ⚙️ How I built the model → (coming next)
- 🔍 Explainability (Grad-CAM) → (coming)
🙌 Let’s Learn Together
If you’ve worked on a multi-class CNN:
👉 Which classes were hardest for your model to distinguish?
👨🏻💻 Author
Tanmay Tawade




Top comments (0)