MCPcopy Index your code
hub / github.com/pytorch/pytorch / AlexNet

Function AlexNet

caffe2/experiments/python/convnet_benchmarks.py:115–193  ·  view source on GitHub ↗
(order)

Source from the content-addressed store, hash-verified

113
114
115def AlexNet(order):
116 model = cnn.CNNModelHelper(order, name="alexnet",
117 use_cudnn=True, cudnn_exhaustive_search=True)
118 conv1 = model.Conv(
119 "data",
120 "conv1",
121 3,
122 64,
123 11,
124 ('XavierFill', {}),
125 ('ConstantFill', {}),
126 stride=4,
127 pad=2
128 )
129
130 relu1 = model.Relu(conv1, "conv1")
131 pool1 = model.MaxPool(relu1, "pool1", kernel=3, stride=2)
132 conv2 = model.Conv(
133 pool1,
134 "conv2",
135 64,
136 192,
137 5,
138 ('XavierFill', {}),
139 ('ConstantFill', {}),
140 pad=2
141 )
142 relu2 = model.Relu(conv2, "conv2")
143 pool2 = model.MaxPool(relu2, "pool2", kernel=3, stride=2)
144 conv3 = model.Conv(
145 pool2,
146 "conv3",
147 192,
148 384,
149 3,
150 ('XavierFill', {}),
151 ('ConstantFill', {}),
152 pad=1
153 )
154 relu3 = model.Relu(conv3, "conv3")
155 conv4 = model.Conv(
156 relu3,
157 "conv4",
158 384,
159 256,
160 3,
161 ('XavierFill', {}),
162 ('ConstantFill', {}),
163 pad=1
164 )
165 relu4 = model.Relu(conv4, "conv4")
166 conv5 = model.Conv(
167 relu4,
168 "conv5",
169 256,
170 256,
171 3,
172 ('XavierFill', {}),

Callers

nothing calls this directly

Calls 5

ConvMethod · 0.95
ReluMethod · 0.95
MaxPoolMethod · 0.95
FCMethod · 0.95
SoftmaxMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…