# VGG 16 Architecture

**URL:** <https://discuss.pytorch.org/t/vgg-16-architecture/27024>\
**Category:** vision\
**Created:** [October 11, 2018, 4:12am UTC](https://discuss.pytorch.org/t/vgg-16-architecture/27024 "2018-10-11T04:12:14Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![shaqdc1](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/s/cdc98d/32.png) [@shaqdc1](https://discuss.pytorch.org/u/shaqdc1)\
**Post date:** [October 11, 2018, 4:23am UTC](https://discuss.pytorch.org/t/vgg-16-architecture/27024/4 "2018-10-11T04:23:25Z")

</div>

I want pytorch code for this

VGG(  
(features): Sequential(  
(0): Conv2d(3, 64, kernel\_size=(3, 3), stride=(1, 1), padding=(1, 1))  
(1): ReLU(inplace)  
(2): Conv2d(64, 64, kernel\_size=(3, 3), stride=(1, 1), padding=(1, 1))  
(3): ReLU(inplace)  
(4): MaxPool2d(kernel\_size=2, stride=2, padding=0, dilation=1, ceil\_mode=False)  
(5): Conv2d(64, 128, kernel\_size=(3, 3), stride=(1, 1), padding=(1, 1))  
(6): ReLU(inplace)  
(7): Conv2d(128, 128, kernel\_size=(3, 3), stride=(1, 1), padding=(1, 1))  
(8): ReLU(inplace)  
(9): MaxPool2d(kernel\_size=2, stride=2, padding=0, dilation=1, ceil\_mode=False)  
(10): Conv2d(128, 256, kernel\_size=(3, 3), stride=(1, 1), padding=(1, 1))  
(11): ReLU(inplace)  
(12): Conv2d(256, 256, kernel\_size=(3, 3), stride=(1, 1), padding=(1, 1))  
(13): ReLU(inplace)  
(14): Conv2d(256, 256, kernel\_size=(3, 3), stride=(1, 1), padding=(1, 1))  
(15): ReLU(inplace)  
(16): MaxPool2d(kernel\_size=2, stride=2, padding=0, dilation=1, ceil\_mode=False)  
(17): Conv2d(256, 512, kernel\_size=(3, 3), stride=(1, 1), padding=(1, 1))  
(18): ReLU(inplace)  
(19): Conv2d(512, 512, kernel\_size=(3, 3), stride=(1, 1), padding=(1, 1))  
(20): ReLU(inplace)  
(21): Conv2d(512, 512, kernel\_size=(3, 3), stride=(1, 1), padding=(1, 1))  
(22): ReLU(inplace)  
(23): MaxPool2d(kernel\_size=2, stride=2, padding=0, dilation=1, ceil\_mode=False)  
(24): Conv2d(512, 512, kernel\_size=(3, 3), stride=(1, 1), padding=(1, 1))  
(25): ReLU(inplace)  
(26): Conv2d(512, 512, kernel\_size=(3, 3), stride=(1, 1), padding=(1, 1))  
(27): ReLU(inplace)  
(28): Conv2d(512, 512, kernel\_size=(3, 3), stride=(1, 1), padding=(1, 1))  
(29): ReLU(inplace)  
(30): MaxPool2d(kernel\_size=2, stride=2, padding=0, dilation=1, ceil\_mode=False)  
)  
(classifier): Sequential(  
(0): Linear(in\_features=25088, out\_features=4096, bias=True)  
(1): ReLU(inplace)  
(2): Dropout(p=0.5)  
(3): Linear(in\_features=4096, out\_features=4096, bias=True)  
(4): ReLU(inplace)  
(5): Dropout(p=0.5)  
(6): Linear(in\_features=4096, out\_features=1000, bias=True)  
)  
)

To try and make changes to the architecture, (kernel fileter some other activation like elu) and check its performance.

---

_[View the full topic](https://discuss.pytorch.org/t/vgg-16-architecture/27024)._
