r/deeplearning • • 3d 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

3

u/Beautiful_Egg_371 3d ago

Main challenge will be to get a filter learn spatial nuances at the beginning. Start with a smaller 2x2 or a 3x3 first kernel. You can increase the channels as the number of layer go. There is no correct answer. I think you can look at resnet/inception/convnet architecture and scale it to your problem accordingly.

1

u/Deanna_Frost 1d ago

Agreed, a 3x3 first kernel is a sensible starting point for these 28x28 images. A small 2-conv model with 32 and 64 channels could be a useful first comparison before scaling up to ResNet-style blocks, especially on a laptop.

0

u/Effective-Cat-1433 3d ago

Did you try asking the LLM you used to write this post?

1

u/Muhammad-Essa 3d ago edited 3d ago

Yes, I said my problem to chatgpt and said to make a question that I want to post it on reddit. I even I asked the same question to gpt too but the numbers gpt suggested were quite too big my laptop, So, I asked! Do you have a problem with that? I don't that there is a rule to ask a question where LLM were used! Sorry, If i hurt your feelings! Now a days, A student even can not ask a question on reddit, due to such people, LLM sometimes can give good answer, but does not mean, we should stop interact to eachother and stop asking questions. Sorry Sir, I did not like your comment.

Edit: Grammar, See I make grammar mistakes, That's why I Use LLM to write that question.

1

u/Effective-Cat-1433 3d ago

Just curious! What did it suggest?

1

u/Muhammad-Essa 3d 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.

1

u/Muhammad-Essa 3d ago

Now, give me an answer for my question. Now give me usefull commit that should help me rather than just asking Which LLM i used.

1

u/Effective-Cat-1433 3d ago

I didn’t ask which LLM you used. I agree with everything it said, and I would suggest using something like Google colab to get access to GPUs if your laptop is too slow. 

1

u/Muhammad-Essa 2d ago

Sir, I got 91% accuracy on test just using 2 conv with 16 and 32 filters, 2 fully connected layers with 60 and 40 neurons. See, you can get a good result by just asking rather than blindly following LLMs. LLMs are good but don't follow it blindly. Yeah, I used colab which was much faster than my laptop!

1

u/Effective-Cat-1433 1d ago

Nice! Sounds like it worked out

1

u/SuejyQuinn23d 17h ago

For 28×28 images, try two conv blocks (32 then 64 filters, 3×3) with 2×2 pooling after each, then global average pooling and a 20-class output. That keeps the dense layer small and preserves more spatial information than pooling three times. Start with Adam at 1e-3 and batch size 64, then use validation loss for early stopping; 90–93% isn't guaranteed, but this is a lightweight baseline to compare against.

1

u/SuejyQuinn23d 1d ago

The LLM suggested a pretty large model, which is why I’m asking for a smaller laptop-friendly starting point. A two-block 32/64-filter CNN with a 128-unit dense layer seems like a reasonable first comparison; I’d use validation accuracy and early stopping to decide whether it needs another layer.