MCPcopy Create free account
hub / github.com/VCIP-RGBD/DFormer / encode_decode

Method encode_decode

models/builder.py:225–239  ·  view source on GitHub ↗

Encode images with backbone and decode into a semantic segmentation map of the same size as input.

(self, rgb, modal_x)

Source from the content-addressed store, hash-verified

223 def init_weights(self, cfg, pretrained=None):
224 if pretrained:
225 logger.info("Loading pretrained model: {}".format(pretrained))
226 self.backbone.init_weights(pretrained=pretrained)
227 logger.info("Initing weights ...")
228 init_weight(
229 self.decode_head,
230 nn.init.kaiming_normal_,
231 self.norm_layer,
232 cfg.bn_eps,
233 cfg.bn_momentum,
234 mode="fan_in",
235 nonlinearity="relu",
236 )
237 if self.aux_head:
238 init_weight(
239 self.aux_head,
240 nn.init.kaiming_normal_,
241 self.norm_layer,
242 cfg.bn_eps,

Callers 1

forwardMethod · 0.95

Calls 1

forwardMethod · 0.45

Tested by

no test coverage detected