MCPcopy Create free account
hub / github.com/ActiveVisionLab/DFNet / __init__

Method __init__

script/feature/model.py:297–319  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

295class autoencoder_vgg6(nn.Module): # robust feature extractors
296 ''' vgg encoder with bilinear upsampling'''
297 def __init__(self):
298 super(autoencoder_vgg6, self).__init__()
299 self.encoder = models.vgg19(pretrained=True).features
300 self.decoder = nn.Sequential(
301 # (b, 512, 14, 14)
302 nn.Conv2d(512, 512, 3, stride=1, padding=1),
303 nn.ReLU(True),
304 # (b, 512, 28, 28)
305 nn.Conv2d(512, 512, 3, stride=1, padding=1),
306 nn.ReLU(True),
307 # (b, 256, 56, 56)
308 nn.Conv2d(512, 256, 3, stride=1, padding=1),
309 nn.ReLU(True),
310 # (b, 128, 112, 112)
311 nn.Conv2d(256, 128, 3, stride=1, padding=1),
312 nn.ReLU(True),
313 # (b, 64, 224, 224)
314 nn.Conv2d(128, 64, 3, stride=1, padding=1),
315 nn.ReLU(True),
316 # nn.Conv2d(64, 3, 3, stride=1, padding=1),
317 # nn.Tanh() # MSELoss
318 # nn.Sigmoid() # BCELoss
319 )
320
321 def forward(self, x, upsampleH, upsampleW): #
322 feat = []

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected