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

Method __init__

ldm/modules/midas/midas/blocks.py:235–261  ·  view source on GitHub ↗

Init. Args: features (int): number of features

(self, features, activation, bn)

Source from the content-addressed store, hash-verified

233 """
234
235 def __init__(self, features, activation, bn):
236 """Init.
237
238 Args:
239 features (int): number of features
240 """
241 super().__init__()
242
243 self.bn = bn
244
245 self.groups=1
246
247 self.conv1 = nn.Conv2d(
248 features, features, kernel_size=3, stride=1, padding=1, bias=True, groups=self.groups
249 )
250
251 self.conv2 = nn.Conv2d(
252 features, features, kernel_size=3, stride=1, padding=1, bias=True, groups=self.groups
253 )
254
255 if self.bn==True:
256 self.bn1 = nn.BatchNorm2d(features)
257 self.bn2 = nn.BatchNorm2d(features)
258
259 self.activation = activation
260
261 self.skip_add = nn.quantized.FloatFunctional()
262
263 def forward(self, x):
264 """Forward pass.

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected