MCPcopy Create free account
hub / github.com/ChunmingHe/WS-SAM / forward

Method forward

lib/Modules.py:746–754  ·  view source on GitHub ↗
(self, x, edge)

Source from the content-addressed store, hash-verified

744 self.mlp_beta = nn.Conv2d(hidden_channels, out_channels, kernel_size=3, padding=1)
745
746 def forward(self, x, edge):
747 normalized = self.param_free_norm(x)
748
749 edge = F.interpolate(edge, size=x.size()[2:], mode='nearest')
750 actv = self.mlp_shared(edge)
751 gamma = self.mlp_gamma(actv)
752 beta = self.mlp_beta(actv)
753 out = normalized * (1 + gamma) + beta
754 return out
755
756
757class Decoder(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected