A from-scratch C++17 implementation of AlexNet inference using plain tensors and custom layer implementations (Conv2D, ReLU, LRN, MaxPool2D, Linear, Dropout, Softmax).
include/: layer/model/tensor headers and configuration constantssrc/: implementation files and demo entry point (main.cpp)CMakeLists.txt: build configuration
- CMake 3.16 or newer
- C++17-compatible compiler (AppleClang/Clang/GCC)
cmake -S . -B build
cmake --build build -jRun the demo executable:
./build/alexnet_demoExpected output format:
Logits shape: [N, 1000]First 10 probabilities: ...
The demo currently creates a deterministic synthetic input tensor (1 x 3 x 227 x 227), runs a forward pass, and prints logits/probability summaries.