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

Method forward_cat

mmseg/models/backbones/stdc.py:116–130  ·  view source on GitHub ↗
(self, inputs)

Source from the content-addressed store, hash-verified

114 return torch.cat(layer_outputs, dim=1) + inputs
115
116 def forward_cat(self, inputs):
117 x0 = self.layers[0](inputs)
118 layer_outputs = [x0]
119 for i, layer in enumerate(self.layers[1:]):
120 if i == 0:
121 if self.with_downsample:
122 x = layer(self.downsample(x0))
123 else:
124 x = layer(x0)
125 else:
126 x = layer(x)
127 layer_outputs.append(x)
128 if self.with_downsample:
129 layer_outputs[0] = self.skip(x0)
130 return torch.cat(layer_outputs, dim=1)
131
132
133class FeatureFusionModule(BaseModule):

Callers 1

forwardMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected