MCPcopy Create free account
hub / github.com/JunlinHan/DCLGAN / create_mlp

Method create_mlp

models/networks.py:578–586  ·  view source on GitHub ↗
(self, feats)

Source from the content-addressed store, hash-verified

576 self.gpu_ids = gpu_ids
577
578 def create_mlp(self, feats):
579 for mlp_id, feat in enumerate(feats):
580 input_nc = feat.shape[1]
581 mlp = nn.Sequential(*[nn.Linear(input_nc, self.nc), nn.ReLU(), nn.Linear(self.nc, self.nc)])
582 if len(self.gpu_ids) > 0:
583 mlp.cuda()
584 setattr(self, 'mlp_%d' % mlp_id, mlp)
585 init_net(self, self.init_type, self.init_gain, self.gpu_ids)
586 self.mlp_init = True
587
588 def forward(self, feats, num_patches=64, patch_ids=None):
589 return_ids = []

Callers 1

forwardMethod · 0.95

Calls 1

init_netFunction · 0.85

Tested by

no test coverage detected