{
  "schemaVersion": 1,
  "slug": "alexnet",
  "title": "The convolutional network that changed ImageNet",
  "className": "ReducedAlexNet",
  "question": "How do five convolutions turn an image into a classification vector?",
  "description": "Inspect an AlexNet reference with reduced widths, including grouped convolutions, local response normalization, overlapping pooling and dropout.",
  "category": "Vision milestones",
  "tags": [
    "AlexNet",
    "ImageNet",
    "CNN",
    "LRN",
    "Dropout"
  ],
  "curator": "TensorViz",
  "attribution": "Original TensorViz teaching example. PyTorch provides the underlying operators.",
  "license": "No separate redistribution license has been declared for these project examples.",
  "limitations": "Untrained reduced-width reference. It does not recreate the original two-GPU execution, ImageNet training, augmentation or accuracy. The 227-pixel input follows the common implementation convention that yields a 55-pixel first map. CPU capture runs in evaluation mode, so dropout is inactive.",
  "openingStep": "groups",
  "provenance": {
    "capturedAt": "2026-09-17T06:25:39.759240+00:00",
    "productRevision": "cf0ab1c9c58c1dc640235b742fa032cade00b43c",
    "sourceSha256": "8e1a9aaec3de8fc9305b61411c0209c32aacbc6812aa2647307e55a6e4e05f38",
    "python": "3.13.13",
    "torch": "2.7.1",
    "execution": {
      "inputs": {
        "args": [
          {
            "shape": [
              1,
              3,
              227,
              227
            ],
            "dtype": "float32",
            "fill": "randn"
          }
        ]
      },
      "device": "cpu",
      "mode": "eval",
      "seed": 0,
      "deterministic": true
    },
    "outcome": "passed",
    "outputShape": [
      1,
      10
    ],
    "method": "TensorViz multifile projection and isolated execution worker",
    "scope": "Reduced AlexNet CPU forward, independent LRN/pooling calculations, grouped-convolution isolation and dropout-mode checks. No trained ImageNet evaluation.",
    "numericalChecks": [
      "The 227-pixel convention produces 55-pixel first-convolution maps and ten output logits",
      "LRN matches the original cross-channel sum formula, accounting for PyTorch's alpha convention",
      "Overlapping 3×3 stride-2 pooling matches an independent sliding-window maximum",
      "Grouped convolution isolates its channel groups; dropout scales survivors in training and is identity in evaluation"
    ]
  },
  "layers": [
    {
      "id": "input",
      "label": "input",
      "op": "Input",
      "kind": "input",
      "parent": null,
      "params": {
        "shape": "1,3,227,227"
      }
    },
    {
      "id": "conv1",
      "label": "conv1",
      "op": "Conv2d",
      "kind": "layer",
      "parent": null,
      "params": {
        "in_channels": 3,
        "out_channels": 8,
        "kernel_size": 11,
        "stride": 4
      },
      "source": {
        "line": 16,
        "endLine": 16
      }
    },
    {
      "id": "relu1",
      "label": "relu1",
      "op": "ReLU",
      "kind": "layer",
      "parent": null,
      "params": {},
      "source": {
        "line": 17,
        "endLine": 17
      }
    },
    {
      "id": "norm1",
      "label": "norm1",
      "op": "LocalResponseNorm",
      "kind": "layer",
      "parent": null,
      "params": {
        "size": 5,
        "alpha": 0.0005,
        "beta": 0.75,
        "k": 2
      },
      "source": {
        "line": 19,
        "endLine": 19
      }
    },
    {
      "id": "pool1",
      "label": "pool1",
      "op": "MaxPool2d",
      "kind": "layer",
      "parent": null,
      "params": {
        "kernel_size": 3,
        "stride": 2
      },
      "source": {
        "line": 20,
        "endLine": 20
      }
    },
    {
      "id": "conv2",
      "label": "conv2",
      "op": "Conv2d",
      "kind": "layer",
      "parent": null,
      "params": {
        "in_channels": 8,
        "out_channels": 16,
        "kernel_size": 5,
        "padding": 2,
        "groups": 2
      },
      "source": {
        "line": 21,
        "endLine": 21
      }
    },
    {
      "id": "relu2",
      "label": "relu2",
      "op": "ReLU",
      "kind": "layer",
      "parent": null,
      "params": {},
      "source": {
        "line": 22,
        "endLine": 22
      }
    },
    {
      "id": "norm2",
      "label": "norm2",
      "op": "LocalResponseNorm",
      "kind": "layer",
      "parent": null,
      "params": {
        "size": 5,
        "alpha": 0.0005,
        "beta": 0.75,
        "k": 2
      },
      "source": {
        "line": 23,
        "endLine": 23
      }
    },
    {
      "id": "pool2",
      "label": "pool2",
      "op": "MaxPool2d",
      "kind": "layer",
      "parent": null,
      "params": {
        "kernel_size": 3,
        "stride": 2
      },
      "source": {
        "line": 24,
        "endLine": 24
      }
    },
    {
      "id": "conv3",
      "label": "conv3",
      "op": "Conv2d",
      "kind": "layer",
      "parent": null,
      "params": {
        "in_channels": 16,
        "out_channels": 24,
        "kernel_size": 3,
        "padding": 1
      },
      "source": {
        "line": 25,
        "endLine": 25
      }
    },
    {
      "id": "relu3",
      "label": "relu3",
      "op": "ReLU",
      "kind": "layer",
      "parent": null,
      "params": {},
      "source": {
        "line": 26,
        "endLine": 26
      }
    },
    {
      "id": "conv4",
      "label": "conv4",
      "op": "Conv2d",
      "kind": "layer",
      "parent": null,
      "params": {
        "in_channels": 24,
        "out_channels": 24,
        "kernel_size": 3,
        "padding": 1,
        "groups": 2
      },
      "source": {
        "line": 27,
        "endLine": 27
      }
    },
    {
      "id": "relu4",
      "label": "relu4",
      "op": "ReLU",
      "kind": "layer",
      "parent": null,
      "params": {},
      "source": {
        "line": 28,
        "endLine": 28
      }
    },
    {
      "id": "conv5",
      "label": "conv5",
      "op": "Conv2d",
      "kind": "layer",
      "parent": null,
      "params": {
        "in_channels": 24,
        "out_channels": 16,
        "kernel_size": 3,
        "padding": 1,
        "groups": 2
      },
      "source": {
        "line": 29,
        "endLine": 29
      }
    },
    {
      "id": "relu5",
      "label": "relu5",
      "op": "ReLU",
      "kind": "layer",
      "parent": null,
      "params": {},
      "source": {
        "line": 30,
        "endLine": 30
      }
    },
    {
      "id": "pool5",
      "label": "pool5",
      "op": "MaxPool2d",
      "kind": "layer",
      "parent": null,
      "params": {
        "kernel_size": 3,
        "stride": 2
      },
      "source": {
        "line": 31,
        "endLine": 31
      }
    },
    {
      "id": "flatten",
      "label": "flatten",
      "op": "Flatten",
      "kind": "layer",
      "parent": null,
      "params": {
        "start_dim": 1
      },
      "source": {
        "line": 32,
        "endLine": 32
      }
    },
    {
      "id": "fc6",
      "label": "fc6",
      "op": "Linear",
      "kind": "layer",
      "parent": null,
      "params": {
        "out_features": 64
      },
      "source": {
        "line": 33,
        "endLine": 33
      }
    },
    {
      "id": "relu6",
      "label": "relu6",
      "op": "ReLU",
      "kind": "layer",
      "parent": null,
      "params": {},
      "source": {
        "line": 34,
        "endLine": 34
      }
    },
    {
      "id": "dropout6",
      "label": "dropout6",
      "op": "Dropout",
      "kind": "layer",
      "parent": null,
      "params": {
        "p": 0.5
      },
      "source": {
        "line": 35,
        "endLine": 35
      }
    },
    {
      "id": "fc7",
      "label": "fc7",
      "op": "Linear",
      "kind": "layer",
      "parent": null,
      "params": {
        "in_features": 64,
        "out_features": 64
      },
      "source": {
        "line": 36,
        "endLine": 36
      }
    },
    {
      "id": "relu7",
      "label": "relu7",
      "op": "ReLU",
      "kind": "layer",
      "parent": null,
      "params": {},
      "source": {
        "line": 37,
        "endLine": 37
      }
    },
    {
      "id": "dropout7",
      "label": "dropout7",
      "op": "Dropout",
      "kind": "layer",
      "parent": null,
      "params": {
        "p": 0.5
      },
      "source": {
        "line": 38,
        "endLine": 38
      }
    },
    {
      "id": "fc8",
      "label": "fc8",
      "op": "Linear",
      "kind": "layer",
      "parent": null,
      "params": {
        "in_features": 64,
        "out_features": 10
      },
      "source": {
        "line": 39,
        "endLine": 39
      }
    },
    {
      "id": "output",
      "label": "output",
      "op": "Output",
      "kind": "output",
      "parent": null,
      "params": {}
    }
  ],
  "connections": [
    {
      "id": "edge-1",
      "source": "input",
      "target": "conv1",
      "sourcePort": null,
      "targetPort": null
    },
    {
      "id": "edge-2",
      "source": "conv1",
      "target": "relu1",
      "sourcePort": null,
      "targetPort": null
    },
    {
      "id": "edge-3",
      "source": "relu1",
      "target": "norm1",
      "sourcePort": null,
      "targetPort": null
    },
    {
      "id": "edge-4",
      "source": "norm1",
      "target": "pool1",
      "sourcePort": null,
      "targetPort": null
    },
    {
      "id": "edge-5",
      "source": "pool1",
      "target": "conv2",
      "sourcePort": null,
      "targetPort": null
    },
    {
      "id": "edge-6",
      "source": "conv2",
      "target": "relu2",
      "sourcePort": null,
      "targetPort": null
    },
    {
      "id": "edge-7",
      "source": "relu2",
      "target": "norm2",
      "sourcePort": null,
      "targetPort": null
    },
    {
      "id": "edge-8",
      "source": "norm2",
      "target": "pool2",
      "sourcePort": null,
      "targetPort": null
    },
    {
      "id": "edge-9",
      "source": "pool2",
      "target": "conv3",
      "sourcePort": null,
      "targetPort": null
    },
    {
      "id": "edge-10",
      "source": "conv3",
      "target": "relu3",
      "sourcePort": null,
      "targetPort": null
    },
    {
      "id": "edge-11",
      "source": "relu3",
      "target": "conv4",
      "sourcePort": null,
      "targetPort": null
    },
    {
      "id": "edge-12",
      "source": "conv4",
      "target": "relu4",
      "sourcePort": null,
      "targetPort": null
    },
    {
      "id": "edge-13",
      "source": "relu4",
      "target": "conv5",
      "sourcePort": null,
      "targetPort": null
    },
    {
      "id": "edge-14",
      "source": "conv5",
      "target": "relu5",
      "sourcePort": null,
      "targetPort": null
    },
    {
      "id": "edge-15",
      "source": "relu5",
      "target": "pool5",
      "sourcePort": null,
      "targetPort": null
    },
    {
      "id": "edge-16",
      "source": "pool5",
      "target": "flatten",
      "sourcePort": null,
      "targetPort": null
    },
    {
      "id": "edge-17",
      "source": "flatten",
      "target": "fc6",
      "sourcePort": null,
      "targetPort": null
    },
    {
      "id": "edge-18",
      "source": "fc6",
      "target": "relu6",
      "sourcePort": null,
      "targetPort": null
    },
    {
      "id": "edge-19",
      "source": "relu6",
      "target": "dropout6",
      "sourcePort": null,
      "targetPort": null
    },
    {
      "id": "edge-20",
      "source": "dropout6",
      "target": "fc7",
      "sourcePort": null,
      "targetPort": null
    },
    {
      "id": "edge-21",
      "source": "fc7",
      "target": "relu7",
      "sourcePort": null,
      "targetPort": null
    },
    {
      "id": "edge-22",
      "source": "relu7",
      "target": "dropout7",
      "sourcePort": null,
      "targetPort": null
    },
    {
      "id": "edge-23",
      "source": "dropout7",
      "target": "fc8",
      "sourcePort": null,
      "targetPort": null
    },
    {
      "id": "edge-24",
      "source": "fc8",
      "target": "output",
      "sourcePort": null,
      "targetPort": null
    }
  ],
  "steps": [
    {
      "id": "features",
      "target": "conv1",
      "title": "Start with a large strided convolution",
      "note": "An 11×11 kernel with stride four maps the 227×227 RGB image to eight 55×55 feature maps. ReLU follows, then local response normalization across nearby channels."
    },
    {
      "id": "groups",
      "target": "conv2",
      "title": "Split selected convolutions into channel groups",
      "note": "Convolutions 2, 4 and 5 use two groups, reflecting the original architecture's split computation. Each output group sees its own input-channel group. Convolution 3 mixes across the full previous representation."
    },
    {
      "id": "pool",
      "target": "pool5",
      "title": "Pool overlapping neighborhoods",
      "note": "A 3×3 window advances by two pixels, so adjacent pooling windows overlap. After the fifth convolution, the final pooling stage leaves 16 channels at 6×6, or 576 features."
    },
    {
      "id": "dropout",
      "target": "dropout6",
      "title": "Regularize the dense classifier during training",
      "note": "The first fully connected layer maps 576 features to 64. Dropout masks half its activated features on average during training and rescales survivors. It acts as identity in the captured evaluation forward."
    }
  ],
  "milestone": {
    "name": "AlexNet",
    "year": 2012,
    "kind": "Architecture",
    "fidelity": "Five convolutions and three fully connected layers with widths 8/16/24/24/16 and 64/64/10. Uses a 227-pixel input convention, grouped conv2/4/5, LRN after the first two ReLUs, 3×3 stride-2 pools and 50% dropout.",
    "papers": [
      {
        "title": "ImageNet Classification with Deep Convolutional Neural Networks",
        "url": "https://papers.nips.cc/paper_files/paper/2012/hash/c399862d3b9d6b76c8436e924a68c45b-Abstract.html"
      }
    ]
  },
  "experiment": {
    "kind": "matrices",
    "title": "Build features while reducing image resolution.",
    "description": "Five convolutions lead to a 16×6×6 representation and three fully connected layers. ReLU, overlapping pooling, LRN, grouped computation and dropout preserve the main architecture choices in a smaller model.",
    "controlLabel": "Feature stage",
    "cases": [
      {
        "id": "first",
        "label": "First convolution → LRN → pool",
        "target": "pool1",
        "note": "These are thumbnails of at most 8×8 cells, average-pooled from a recorded feature channel of a synthetic stripe image. The first two paths apply cross-channel LRN before pooling; the fifth pools directly. The displayed maps are untrained features and do not demonstrate ImageNet accuracy.",
        "matrices": [
          {
            "label": "Before normalization / pooling · thumbnail",
            "values": [
              [
                0.006856542080640793,
                0.006856542080640793,
                0.0042853388004004955,
                0,
                0,
                0.0042853388004004955,
                0.006856542080640793,
                0.006856542080640793
              ],
              [
                0.006856542080640793,
                0.006856542080640793,
                0.0042853388004004955,
                0,
                0,
                0.0042853388004004955,
                0.006856542080640793,
                0.006856542080640793
              ],
              [
                0.006856542080640793,
                0.006856542080640793,
                0.0042853388004004955,
                0,
                0,
                0.0042853388004004955,
                0.006856542080640793,
                0.006856542080640793
              ],
              [
                0.006856542080640793,
                0.006856542080640793,
                0.0042853388004004955,
                0,
                0,
                0.0042853388004004955,
                0.006856542080640793,
                0.006856542080640793
              ],
              [
                0.006856542080640793,
                0.006856542080640793,
                0.0042853388004004955,
                0,
                0,
                0.0042853388004004955,
                0.006856542080640793,
                0.006856542080640793
              ],
              [
                0.006856542080640793,
                0.006856542080640793,
                0.0042853388004004955,
                0,
                0,
                0.0042853388004004955,
                0.006856542080640793,
                0.006856542080640793
              ],
              [
                0.006856542080640793,
                0.006856542080640793,
                0.0042853388004004955,
                0,
                0,
                0.0042853388004004955,
                0.006856542080640793,
                0.006856542080640793
              ],
              [
                0.006856542080640793,
                0.006856542080640793,
                0.0042853388004004955,
                0,
                0,
                0.0042853388004004955,
                0.006856542080640793,
                0.006856542080640793
              ]
            ]
          },
          {
            "label": "After pooling · thumbnail",
            "values": [
              [
                0.004076924304934955,
                0.004076924304934955,
                0.0024461545829609728,
                0,
                0,
                0.0024461545829609728,
                0.004076924304934955,
                0.004076924304934955
              ],
              [
                0.004076924304934955,
                0.004076924304934955,
                0.0024461545829609728,
                0,
                0,
                0.0024461545829609728,
                0.004076924304934955,
                0.004076924304934955
              ],
              [
                0.004076924304934953,
                0.004076924304934953,
                0.0024461545829609728,
                0,
                0,
                0.0024461545829609728,
                0.004076924304934953,
                0.004076924304934953
              ],
              [
                0.004076924304934955,
                0.004076924304934955,
                0.0024461545829609728,
                0,
                0,
                0.0024461545829609728,
                0.004076924304934955,
                0.004076924304934955
              ],
              [
                0.004076924304934955,
                0.004076924304934955,
                0.0024461545829609728,
                0,
                0,
                0.0024461545829609728,
                0.004076924304934955,
                0.004076924304934955
              ],
              [
                0.004076924304934953,
                0.004076924304934953,
                0.0024461545829609728,
                0,
                0,
                0.0024461545829609728,
                0.004076924304934953,
                0.004076924304934953
              ],
              [
                0.004076924304934955,
                0.004076924304934955,
                0.0024461545829609728,
                0,
                0,
                0.0024461545829609728,
                0.004076924304934955,
                0.004076924304934955
              ],
              [
                0.004076924304934955,
                0.004076924304934955,
                0.0024461545829609728,
                0,
                0,
                0.0024461545829609728,
                0.004076924304934955,
                0.004076924304934955
              ]
            ]
          }
        ],
        "vectors": [
          {
            "label": "Feature shape · channels / height / width",
            "values": [
              8,
              27,
              27
            ]
          }
        ],
        "metrics": [
          {
            "label": "Spatial width before pool",
            "value": 55
          },
          {
            "label": "Spatial width after pool",
            "value": 27
          },
          {
            "label": "Values after pool · all channels",
            "value": 5832
          }
        ]
      },
      {
        "id": "second",
        "label": "Grouped convolution 2 → LRN → pool",
        "target": "conv2",
        "note": "These are thumbnails of at most 8×8 cells, average-pooled from a recorded feature channel of a synthetic stripe image. The first two paths apply cross-channel LRN before pooling; the fifth pools directly. The displayed maps are untrained features and do not demonstrate ImageNet accuracy.",
        "matrices": [
          {
            "label": "Before normalization / pooling · thumbnail",
            "values": [
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ]
            ]
          },
          {
            "label": "After pooling · thumbnail",
            "values": [
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ]
            ]
          }
        ],
        "vectors": [
          {
            "label": "Feature shape · channels / height / width",
            "values": [
              16,
              13,
              13
            ]
          }
        ],
        "metrics": [
          {
            "label": "Spatial width before pool",
            "value": 27
          },
          {
            "label": "Spatial width after pool",
            "value": 13
          },
          {
            "label": "Values after pool · all channels",
            "value": 2704
          }
        ]
      },
      {
        "id": "fifth",
        "label": "Convolution 5 → final pool",
        "target": "pool5",
        "note": "These are thumbnails of at most 8×8 cells, average-pooled from a recorded feature channel of a synthetic stripe image. The first two paths apply cross-channel LRN before pooling; the fifth pools directly. The displayed maps are untrained features and do not demonstrate ImageNet accuracy.",
        "matrices": [
          {
            "label": "Before normalization / pooling · thumbnail",
            "values": [
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
              ]
            ]
          },
          {
            "label": "After pooling · thumbnail",
            "values": [
              [
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0
              ],
              [
                0,
                0,
                0,
                0,
                0,
                0
              ]
            ]
          }
        ],
        "vectors": [
          {
            "label": "Feature shape · channels / height / width",
            "values": [
              16,
              6,
              6
            ]
          }
        ],
        "metrics": [
          {
            "label": "Spatial width before pool",
            "value": 13
          },
          {
            "label": "Spatial width after pool",
            "value": 6
          },
          {
            "label": "Values after pool · all channels",
            "value": 576
          }
        ]
      }
    ]
  },
  "revision": "fa1d0156d71ecbf0",
  "files": {
    "graph.tensorviz.json": {
      "url": "/models/alexnet/fa1d0156d71ecbf0/graph.tensorviz.json",
      "sha256": "8cce5264156e03b587d65b483e025c10eb0774c57b9cade1700f7be2ecaf1784",
      "bytes": 65614
    },
    "model.py": {
      "url": "/models/alexnet/fa1d0156d71ecbf0/model.py",
      "sha256": "8e1a9aaec3de8fc9305b61411c0209c32aacbc6812aa2647307e55a6e4e05f38",
      "bytes": 6977
    },
    "run.py": {
      "url": "/models/alexnet/fa1d0156d71ecbf0/run.py",
      "sha256": "eddf56d2c4f1ee6cde493ba9545773353f5bba2fdf055d679264531dc5629c04",
      "bytes": 658
    },
    "requirements.txt": {
      "url": "/models/alexnet/fa1d0156d71ecbf0/requirements.txt",
      "sha256": "edb86016b42cb3cc6cdc0c490aab929d3bb098ced4515394f0b55766033e0daf",
      "bytes": 91
    },
    "preview.svg": {
      "url": "/models/alexnet/fa1d0156d71ecbf0/preview.svg",
      "sha256": "ab46c5ed6d41b2bc1c06f142a170af8cd1f64e21dc06781c44dcbe5673e50db7",
      "bytes": 2244
    }
  }
}
