MCPcopy Create free account
hub / github.com/PKU-ASAL/Simulated-Data / __init__

Method __init__

src/Sysdig/model.py:33–43  ·  view source on GitHub ↗
(self,latent_dims)

Source from the content-addressed store, hash-verified

31
32class VariationalEncoder(nn.Module):
33 def __init__(self,latent_dims):
34 super(VariationalEncoder,self).__init__()
35 self.linear1 = nn.Linear(256,128)
36 self.linear2 = nn.Linear(128,64)
37 self.linear3 = nn.Linear(64,latent_dims)
38 self.linear4 = nn.Linear(64,latent_dims)
39
40 self.N = torch.distributions.Normal(0,1)
41 self.N.loc = self.N.loc.cuda()
42 self.N.scale = self.N.scale.cuda()
43 self.kl = 0
44
45 def forward(self,x):
46 x = F.relu(self.linear1(x))

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected