MCPcopy Create free account
hub / github.com/PaddlePaddle/Research / basic_block

Method basic_block

CV/SemSegPaddle/src/models/backbone/resnet.py:262–278  ·  view source on GitHub ↗
(self, input, num_filters, stride, is_first, name)

Source from the content-addressed store, hash-verified

260 x=short, y=conv2, act='relu', name=name + ".add.output.5")
261
262 def basic_block(self, input, num_filters, stride, is_first, name):
263 conv0 = self.conv_bn_layer(
264 input=input,
265 num_filters=num_filters,
266 filter_size=3,
267 act='relu',
268 stride=stride,
269 name=name + "_branch2a")
270 conv1 = self.conv_bn_layer(
271 input=conv0,
272 num_filters=num_filters,
273 filter_size=3,
274 act=None,
275 name=name + "_branch2b")
276 short = self.shortcut(
277 input, num_filters, stride, is_first, name=name + "_branch1")
278 return fluid.layers.elementwise_add(x=short, y=conv1, act='relu')
279
280
281def ResNet18():

Callers 1

netMethod · 0.95

Calls 2

conv_bn_layerMethod · 0.95
shortcutMethod · 0.95

Tested by

no test coverage detected