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

Method __init__

models/net_utils.py:53–58  ·  view source on GitHub ↗
(self, dim, reduction=1, lambda_c=0.5, lambda_s=0.5)

Source from the content-addressed store, hash-verified

51# FRM
52class FeatureRectifyModule(nn.Module):
53 def __init__(self, dim, reduction=1, lambda_c=0.5, lambda_s=0.5):
54 super(FeatureRectifyModule, self).__init__()
55 self.lambda_c = lambda_c
56 self.lambda_s = lambda_s
57 self.channel_weights = ChannelWeights(dim=dim, reduction=reduction)
58 self.spatial_weights = SpatialWeights(dim=dim, reduction=reduction)
59
60 def _init_weights(self, m):
61 if isinstance(m, nn.Linear):

Callers

nothing calls this directly

Calls 3

ChannelWeightsClass · 0.85
SpatialWeightsClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected