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

Class Decoder

src/Sysdig/model.py:53–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 self.kl = (sigma**2 + mu**2 - torch.log(sigma) - 1/2).sum()
52 return z
53class Decoder(nn.Module):
54 def __init__(self,latent_dims):
55 super(Decoder,self).__init__()
56 self.linear1 = nn.Linear(latent_dims,64)
57 self.linear2 = nn.Linear(64,128)
58 self.linear3 = nn.Linear(128,256)
59
60 def forward(self,z):
61 z = F.relu(self.linear1(z))
62 z = F.relu(self.linear2(z))
63 z = self.linear3(z)
64 return z
65
66class VariationalAutoencoder(nn.Module):
67 def __init__(self, latent_dims):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected