MCPcopy Create free account
hub / github.com/CSAILVision/gandissect / DoubleResolutionLayer

Class DoubleResolutionLayer

netdissect/proggan.py:105–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103 return x / torch.sqrt(torch.mean(x**2, dim=1, keepdim=True) + 1e-8)
104
105class DoubleResolutionLayer(nn.Module):
106 def forward(self, x):
107 x = nn.functional.interpolate(x, scale_factor=2, mode='nearest')
108 return x
109
110class WScaleLayer(nn.Module):
111 def __init__(self, size, fan_in, gain=numpy.sqrt(2)):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected