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

Method add_detection_unit

caffe2/python/models/shufflenet.py:141–150  ·  view source on GitHub ↗
(self, prev_blob, prefix, in_channels, out_channels,
                           kernel=3, pad=1)

Source from the content-addressed store, hash-verified

139
140 # helper functions to create net's units
141 def add_detection_unit(self, prev_blob, prefix, in_channels, out_channels,
142 kernel=3, pad=1):
143 out_blob = brew.conv(self.model, prev_blob, prefix + '_conv',
144 in_channels, out_channels, kernel=kernel,
145 weight_init=("MSRAFill", {}),
146 group=in_channels, pad=pad)
147 out_blob = brew.spatial_bn(self.model, out_blob, prefix + '_bn',
148 out_channels, epsilon=self.bn_epsilon,
149 is_test=self.is_test)
150 return out_blob
151
152 def add_conv1x1_bn(self, prev_blob, blob, in_channels, out_channels):
153 prev_blob = brew.conv(self.model, prev_blob, blob, in_channels,

Callers 2

add_spatial_ds_unitMethod · 0.95
add_basic_unitMethod · 0.95

Calls 1

convMethod · 0.45

Tested by

no test coverage detected