bryandlee / repurpose-gan

Implementation of Repurposing GANs for One-shot Semantic Part Segmentation
126 stars 17 forks source link

Representatin extraction #10

Open SpikeRXWong opened 2 years ago

SpikeRXWong commented 2 years ago

Hello,

I have an question about the representation extraction. I didn't find the code for the upsampling activation maps. So my first question is the activation maps the same with the ouputs of each self.convs layers. Second is which method did you use for the upsamplinig, Upsample or Convtranspose2D? And the mode for upsampling contains 5 options, which one did you choose?

Many thanks.

MationPlays commented 2 years ago

these questions would be interesting to get awsered

bryandlee commented 2 years ago

Hi, that part is in the .ipynb file cell 6:

def concat_features(features):
    h = max([f.shape[-2] for f in features])
    w = max([f.shape[-1] for f in features])
    return torch.cat([torch.nn.functional.interpolate(f, (h,w), mode='nearest') for f in features], dim=1)