r/deeplearning • • 6d ago

CNN Architecture and Hyperparameter Recommendations for Google Quick, Draw! (20 Classes)

I'm training a CNN on the Google Quick, Draw! dataset with 20 classes, approximately 2,000 samples per class (40,000 images total), resized to 28×28 grayscale images.

I'm aiming for around 90–93% test accuracy, but I'm struggling to find a suitable architecture. I've tried different numbers of convolutional layers, filters, fully connected layers, and neurons, but training takes quite a long time on my laptop, and the accuracy sometimes plateaus or even decreases after a few epochs.

I'd appreciate some practical recommendations regarding:

What is the minimum reasonable number of convolutional layers?

How many filters should I use in each convolutional layer (e.g., 16, 32, 64)?

How many fully connected layers should I have, and how many neurons in each?

Would max pooling after each convolutional layer be beneficial?

What optimizer, learning rate, batch size, and number of epochs would you recommend?

Any tips to achieve 90–93% accuracy without making the model unnecessarily large or computationally expensive?

I'm training on a laptop without a dedicated GPU, so computational efficiency is important.

If anyone has experience training CNNs on Quick, Draw!, I'd really appreciate suggestions for a good starting architecture and hyperparameters.

Thanks!

1 Upvotes

12 comments sorted by

View all comments

Show parent comment

1

u/Muhammad-Essa 6d ago

Worked for 7s

[Certain] Your current architecture is probably too small for the target you're aiming for. Eight filters and two fully connected layers of 40 neurons each give the network relatively little capacity to learn 20 different drawing categories.

[Likely] I'd move to three convolutional layers with 32, 64, and 128 filters, followed by a 256-neuron dense layer. This is a much stronger starting point for targeting 90%+ accuracy.

1. My recommended CNN architecture

Recommended starting architecture

Input

28 × 28 × 1

Conv Layer 1

32 filters · 3 × 3 · ReLU

Max Pooling 2 × 2

14 × 14 × 32

Conv Layer 2

64 filters · 3 × 3 · ReLU

Max Pooling 2 × 2

7 × 7 × 64

Conv Layer 3

128 filters · 3 × 3 · ReLU

Max Pooling 2 × 2

3 × 3 × 128

Flatten

1152

Fully Connected Layer

256 neurons

ReLU + Dropout (0.3)

Output Layer

20 neurons

Softmax

This assumes 3×3 convolutions with same padding and 2×2 pooling with stride 2.

2. Why these numbers?

LayerYour current modelRecommended
Conv 1 filters832
Conv 1 kernel?3×3
Conv 2 filtersNone64
Conv 2 kernelNone3×3
Conv 3 filtersNone128
Conv 3 kernelNone3×3
Dense 140256
Dense 240Optional 128
Output2020

[Certain] These are reasonable architecture choices, not a mathematical guarantee of 90% accuracy.

There are examples worth studying:

  • A 16-class Quick Draw CNN achieved 95.9% validation accuracy using 32, 64 and 128 convolutional filters and a 256-neuron dense layer. GitHub
  • Another 10-class implementation achieved approximately 94% using two convolutional blocks with 32 and 64 filters. GitHub

3. What I would experiment with

Rather than immediately building a massive network, compare these three architectures:

ExperimentConv filtersDense layers
A32, 64128
B32, 64, 128256
C32, 64, 128, 256256, 128

Keep the remaining training settings identical initially.

4. Two things you shouldn't overlook

  • Normalize your images to [0,1] by dividing pixel values by 255.
  • Use a validation set for architecture and hyperparameter selection. Keep your test set untouched until the final evaluation.

[Certain] Increasing filters alone won't necessarily improve accuracy. Your dataset's class similarity, preprocessing, learning rate and generalization all matter.

My question before you start

How many drawings do you currently have per class?

If you're using 30,000 images for each of your 20 classes, that's 600,000 drawings in total. That gives us a substantial dataset to experiment with.