MCPcopy Create free account
hub / github.com/VisionXLab/OF-Diff / forward

Method forward

ldm/modules/midas/midas/blocks.py:263–288  ·  view source on GitHub ↗

Forward pass. Args: x (tensor): input Returns: tensor: output

(self, x)

Source from the content-addressed store, hash-verified

261 self.skip_add = nn.quantized.FloatFunctional()
262
263 def forward(self, x):
264 """Forward pass.
265
266 Args:
267 x (tensor): input
268
269 Returns:
270 tensor: output
271 """
272
273 out = self.activation(x)
274 out = self.conv1(out)
275 if self.bn==True:
276 out = self.bn1(out)
277
278 out = self.activation(out)
279 out = self.conv2(out)
280 if self.bn==True:
281 out = self.bn2(out)
282
283 if self.groups > 1:
284 out = self.conv_merge(out)
285
286 return self.skip_add.add(out, x)
287
288 # return out + x
289
290
291class FeatureFusionBlock_custom(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected