MCPcopy Create free account
hub / github.com/Parskatt/DeDoDe / forward

Method forward

DeDoDe/decoder.py:13–18  ·  view source on GitHub ↗
(self, features, context = None, scale = None)

Source from the content-addressed store, hash-verified

11 self.super_resolution = super_resolution
12 self.num_prototypes = num_prototypes
13 def forward(self, features, context = None, scale = None):
14 if context is not None:
15 features = torch.cat((features, context), dim = 1)
16 stuff = self.layers[scale](features)
17 logits, context = stuff[:,:self.num_prototypes], stuff[:,self.num_prototypes:]
18 return logits, context
19
20class ConvRefiner(nn.Module):
21 def __init__(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected