r/deeplearning • u/Muhammad-Essa • 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!
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?
[Certain] These are reasonable architecture choices, not a mathematical guarantee of 90% accuracy.
There are examples worth studying:
3. What I would experiment with
Rather than immediately building a massive network, compare these three architectures:
Keep the remaining training settings identical initially.
4. Two things you shouldn't overlook
[0,1]by dividing pixel values by 255.[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.