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

Method forward_add

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

Source from the content-addressed store, hash-verified

103 return out
104
105 def forward_add(self, inputs):
106 layer_outputs = []
107 x = inputs.clone()
108 for layer in self.layers:
109 x = layer(x)
110 layer_outputs.append(x)
111 if self.with_downsample:
112 inputs = self.skip(inputs)
113
114 return torch.cat(layer_outputs, dim=1) + inputs
115
116 def forward_cat(self, inputs):
117 x0 = self.layers[0](inputs)

Callers 1

forwardMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected