(self, feats)
| 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 = [] |