MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / __init__

Method __init__

sat/sgm/modules/autoencoding/lpips/util.py:46–54  ·  view source on GitHub ↗
(self, num_features, logdet=False, affine=True, allow_reverse_init=False)

Source from the content-addressed store, hash-verified

44
45class ActNorm(nn.Module):
46 def __init__(self, num_features, logdet=False, affine=True, allow_reverse_init=False):
47 assert affine
48 super().__init__()
49 self.logdet = logdet
50 self.loc = nn.Parameter(torch.zeros(1, num_features, 1, 1))
51 self.scale = nn.Parameter(torch.ones(1, num_features, 1, 1))
52 self.allow_reverse_init = allow_reverse_init
53
54 self.register_buffer("initialized", torch.tensor(0, dtype=torch.uint8))
55
56 def initialize(self, input):
57 with torch.no_grad():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected