MCPcopy Create free account
hub / github.com/pytorch/pytorch / OverFeat

Function OverFeat

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

Source from the content-addressed store, hash-verified

194
195
196def OverFeat(order):
197 model = cnn.CNNModelHelper(order, name="overfeat",
198 use_cudnn=True, cudnn_exhaustive_search=True)
199 conv1 = model.Conv(
200 "data",
201 "conv1",
202 3,
203 96,
204 11,
205 ('XavierFill', {}),
206 ('ConstantFill', {}),
207 stride=4
208 )
209 relu1 = model.Relu(conv1, "conv1")
210 pool1 = model.MaxPool(relu1, "pool1", kernel=2, stride=2)
211 conv2 = model.Conv(
212 pool1, "conv2", 96, 256, 5, ('XavierFill', {}), ('ConstantFill', {})
213 )
214 relu2 = model.Relu(conv2, "conv2")
215 pool2 = model.MaxPool(relu2, "pool2", kernel=2, stride=2)
216 conv3 = model.Conv(
217 pool2,
218 "conv3",
219 256,
220 512,
221 3,
222 ('XavierFill', {}),
223 ('ConstantFill', {}),
224 pad=1
225 )
226 relu3 = model.Relu(conv3, "conv3")
227 conv4 = model.Conv(
228 relu3,
229 "conv4",
230 512,
231 1024,
232 3,
233 ('XavierFill', {}),
234 ('ConstantFill', {}),
235 pad=1
236 )
237 relu4 = model.Relu(conv4, "conv4")
238 conv5 = model.Conv(
239 relu4,
240 "conv5",
241 1024,
242 1024,
243 3,
244 ('XavierFill', {}),
245 ('ConstantFill', {}),
246 pad=1
247 )
248 relu5 = model.Relu(conv5, "conv5")
249 pool5 = model.MaxPool(relu5, "pool5", kernel=2, stride=2)
250 fc6 = model.FC(
251 pool5, "fc6", 1024 * 6 * 6, 3072, ('XavierFill', {}),
252 ('ConstantFill', {})
253 )

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…