GoogLeNet is a convolutional neural network, also known as Inception v1, that a Google team built for the ImageNet Large-Scale Visual Recognition Challenge 2014 and won with. It is 22 layers deep, yet it keeps the computational budget constant. Its Inception modules use 1×1 convolutions to shrink the channel depth before the expensive 3×3 and 5×5 filters run, so the designers could add depth and width without raising the compute budget. For most experiments that budget was about 1.5 billion multiply-adds per inference, so the network could be used in real systems and not stay an academic curiosity. Whether you should still pick it today depends on what you are optimising for.
Is GoogLeNet a CNN, and What Makes It Different?
Yes, GoogLeNet is a CNN. Inception v1 is a deep CNN of 22 layers, and most of them sit inside “Inception modules”. What set it apart in 2014 was that it was cheaper to compute than its predecessors while being more accurate. The original paper reports that the ILSVRC 2014 submission used 12× fewer parameters than the AlexNet-style winner from two years earlier while being significantly more accurate. The final entry reached a 6.67% top-5 error on both validation and test data, which ranked first.
Dive into Deep Learning makes a further point. GoogLeNet was arguably the first CNN with a clear split between a stem (the first few convolutions that take in the image), a body of convolutional blocks, and a head that maps features to the task. Most CNN architectures since then have used the same stem, body and head structure. If you want to see where that pattern led across architectures, our overview of deep learning architectures for computer vision traces it forward.
How Many Layers Does GoogLeNet Have?
The answer is 22, but what counts as a layer matters. The paper states that the network is 22 layers deep counting only layers with parameters, or 27 if pooling layers are counted too. Google’s own announcement described typical incarnations as having over 100 layers in total, with a maximum depth of over 20 parameter layers. These numbers count different things.
At the block level, GoogLeNet stacks nine Inception blocks in three groups, with max-pooling between the groups and global average pooling in the head. The max-pooling layers use stride 2, so each one halves the resolution of the grid.
Why Does an Inception Module Run 1×1, 3×3 and 5×5 Filters Side by Side?
An Inception module runs several filter sizes in parallel so that visual information is processed at various scales and then aggregated. The paper’s reasoning goes like this. Correlated units in early layers cluster in small regions that 1×1 convolutions can cover, while a smaller number of more spread-out clusters need convolutions over larger patches. So the module applies 1×1, 3×3 and 5×5 filters and joins their outputs into one output for the next stage. The authors say they limited it to those three sizes for convenience rather than necessity. Dive into Deep Learning sums up the design choice. Other work tried to find the single best kernel size between 1×1 and 11×11, and GoogLeNet simply concatenated the branches.
In concrete terms, the block has four parallel branches. The first three are a 1×1 convolution, a 3×3 convolution and a 5×5 convolution. The middle two each add a 1×1 convolution in front to reduce the channel count, and the fourth branch is 3×3 max-pooling followed by a 1×1 convolution. Padding keeps the height and width the same on every branch, so the outputs can be joined along the channel dimension. The paper also expects the share of 3×3 and 5×5 convolutions to grow in higher layers, because more abstract features are less concentrated in space.
Those 1×1 convolutions compute reductions before the expensive 3×3 and 5×5 convolutions. The paper says that their most important job is dimension reduction, removing computational bottlenecks that would otherwise limit the size of the network. Reducing channels before convolving with a large patch lets each stage carry many more units “without an uncontrolled blow-up in computational complexity”. The Inception v3 paper notes that VGGNet used about three times more parameters than AlexNet, while GoogLeNet used about 5 million.
Worked Example: What a 1×1 Reduction Saves on One Branch
The cost of a convolution in multiply-adds is output height × output width × input channels × output channels × kernel area. The channel counts below are assumptions picked to show the mechanism, not values from the GoogLeNet table.
- Direct 5×5: 28 × 28 × 192 × 32 × 25 = about 120.4 million multiply-adds.
- With a 1×1 reduction to 16 channels first: the 1×1 step costs 28 × 28 × 192 × 16 = about 2.4 million, and the 5×5 step costs 28 × 28 × 16 × 32 × 25 = about 10.0 million.
- Total: about 12.4 million multiply-adds, roughly a tenth of the direct version, for the same output shape.
The saving comes from running the expensive kernel over 16 channels instead of 192. Adding a layer still cuts compute here because the extra 1×1 step is cheap and the 5×5 step after it is much smaller. If the bottleneck is squeezed too far, though, it limits the information passing through. The v3 authors later wrote that representational bottlenecks with extreme compression should be avoided, especially early in the network.
Auxiliary Classifiers: Two Extra Heads Used Only in Training
Inception v1 attaches two auxiliary classifiers, small linear-softmax heads at roughly one third and two thirds of the network’s depth, and trains on a weighted sum of all three losses. Wikipedia’s account is that the network was deep enough to suffer from vanishing gradients, which the auxiliary classifiers addressed. In the Inception v3 paper, the authors later argued that the auxiliary classifiers act as a regulariser. Their evidence was that the main classifier did better when the side branch was batch-normalised or had dropout.
torchvision’s pretrained GoogLeNet drops the auxiliary heads by default, leaving only the main classifier.
GoogLeNet vs Inception v3: What Changed Between v1 and v3
The Inception-v4 paper sets out the naming: GoogLeNet is Inception-v1, adding batch normalisation produced Inception-v2, and further factorisation produced Inception-v3. In the Rethinking paper, “Inception-v3” means the cumulative set of changes, not a single change. These are the differences that matter in practice:
- Factorised convolutions. A 5×5 convolution costs 25/9 ≈ 2.78 times as much as a 3×3 with the same filter counts. Two stacked 3×3 convolutions cover the same 5×5 receptive field with 18 weights instead of 25, a 28% saving in both compute and parameters.
- Asymmetric factorisation. A 3×1 convolution followed by a 1×3 is 33% cheaper than a 3×3 when input and output filter counts are equal. The authors found it worked poorly in early layers but well on grids of roughly 12 to 20 cells, where they used 1×7 followed by 7×1.
- Batch normalisation. It came in with v2, which also dropped dropout and local response normalisation because batch normalisation made them unnecessary.
- Label smoothing. With ε = 0.1 over 1,000 classes, the authors report about a 0.2% absolute improvement in top-1 and top-5 error on ILSVRC 2012.
- Bigger input and a deeper network. The v3 layer table starts from a 299×299×3 input. The network is 42 layers deep, at about 2.5 times GoogLeNet’s computation cost.
- Cheaper grid reduction. Parallel stride-2 pooling and convolution branches are concatenated, avoiding an expensive convolution on the larger grid before pooling.
The best Inception-v3 reached 21.2% top-1 and 5.6% top-5 error for single-crop evaluation on ILSVRC 2012. Inception v3 is this 299×299, 42-layer model, a different network from GoogLeNet itself.
Are GoogLeNet and LeNet the Same Network?
No. Google’s 2014 research blog mentions LeNet, Yann LeCun’s influential convolutional network, alongside the GoogLeNet name. LeNet is a much earlier and much smaller CNN, known for handwritten digit recognition, with no Inception modules, no parallel branches and no 1×1 bottlenecks. GoogLeNet’s architectural ancestors include Network in Network and the repeated-block designs of the time.
When Is GoogLeNet Still a Sensible Choice over ResNet or MobileNet?
In short, GoogLeNet still makes sense when compute and memory are tight and an existing pipeline or pretrained checkpoint already depends on it. For a new design, ResNet is usually the stronger default, MobileNet is the better fit for mobile and edge hardware, and Inception v3 is the choice when you want the Inception family at higher accuracy. The evidence for each comparison:
Against ResNet. He et al. (2015) showed that residual networks are easier to optimise and gain accuracy from greater depth, evaluated up to 152 layers. A ResNet ensemble reached 3.57% error and won ILSVRC 2015. GoogLeNet’s 6.67% top-5 came a year earlier. Both are competition submissions, not single-model results, so treat the comparison as generational rather than exact. The Rethinking paper says Inception-v3 beat the He et al. result by 25% relative on top-5 error and 14% on top-1, while being about six times cheaper in computation, and it marks the parameter comparison as an estimate. In the Inception-v4 paper’s 10/12-crop table, ResNet-151 scores 21.4% top-1 and 5.7% top-5 against Inception-v3’s 19.8% and 4.6%. With dense or 144-crop evaluation the figures are 19.4% and 4.5% for ResNet-151 against 18.9% and 4.3% for Inception-v3. Those figures are for Inception-v3, though, not GoogLeNet. Residual connections also bring a training benefit: the same Google team found that adding them sped up training of Inception networks a great deal.
Against MobileNet. MobileNet is built from depthwise separable convolutions in place of standard ones. Each standard convolution becomes a per-channel depthwise filter followed by a 1×1 pointwise convolution. Howard et al. (2017) report that 3×3 depthwise separable convolutions use 8 to 9 times less computation than standard convolutions, at only a small loss of accuracy. GoogLeNet’s 1×1 bottlenecks reduce cost by cutting channel dimensions. MobileNet’s factorisation drastically reduces computation and model size.
On estimating speed from the numbers. Canziani et al. (2016) found that operation count is a reliable estimate of inference time, and that accuracy and inference time follow a hyperbolic relationship. Bianco et al. (2018) measured the same architectures on an NVIDIA Titan X Pascal workstation and an NVIDIA Jetson TX1 board to compare machines with very different compute capacity. We would treat operation counts as a way to build a shortlist and make the final call from latency measured on the target device. Production concerns beyond the backbone, such as preprocessing, batching and deployment, are covered in deep learning for image processing in production.
Decision Table: GoogLeNet and Its Alternatives
| Option | Choose it when | Main trade-off |
|---|---|---|
| GoogLeNet (Inception v1) | Memory and compute are tight, an existing pipeline or checkpoint uses it, or you need a cheap, well-understood baseline | Designed around a 1.5 billion multiply-add budget with about 5 million parameters by the Inception v3 paper’s count, but later families beat it on accuracy |
| Inception v3 | You want a later Inception model and can afford more compute and a 299×299 input | About 2.5× GoogLeNet’s computation cost and 42 layers |
| ResNet | You want a new backbone that is easy to train and fine-tune and scales with depth | Residual networks are easier to optimise and gain accuracy from depth. Inception-v3 beat a ResNet result at six times lower computation |
| MobileNet | The target is a phone or embedded device and computation per frame is the hard constraint | Depthwise separable 3×3 convolutions use 8 to 9× less computation, at a small accuracy cost |
Using GoogLeNet from Torchvision Without Surprises
torchvision documents its googlenet builder as the GoogLeNet (Inception v1) architecture from “Going Deeper with Convolutions”. A code comment in the torchvision source says the pretrained weights were ported from TensorFlow. The Inception v3 builder, inception_v3, implements the model from the Rethinking paper. If you want v3, call that builder, not googlenet.
The auxiliary heads behave differently depending on how you build the model. The GoogLeNet class constructor sets aux_logits=True by default. When you load pretrained weights, though, the builder sets aux_logits to False and transform_input to True unless you pass them yourself. If you ask for auxiliary heads on a pretrained model, torchvision warns that they are not pretrained and must be trained. With the heads enabled, the forward pass returns a GoogLeNetOutputs named tuple holding logits, aux_logits2 and aux_logits1, not a single tensor. So a loop expecting one tensor gets a named tuple, and enabled auxiliary heads start untrained on a pretrained trunk. Check both before the first epoch.
GoogLeNet’s Lasting Contribution
GoogLeNet’s main legacy is the reasoning behind it more than the checkpoint: deliberately trade the cost of evaluating a network against its errors. Its design knobs allowed a controlled balancing of computational resources, but required careful manual design. Dive into Deep Learning notes that many of the network’s channel and block choices look arbitrary because automatic design tools did not exist yet. The open question for any team that still runs it is not whether newer networks beat it on accuracy (they do). It is whether the accuracy you would gain from a newer backbone is worth retraining and revalidating a pipeline that already works. Our computer vision R&D page describes how we help teams weigh that kind of backbone and pipeline decision.