Sketchypath
def forward(self, z): z = torch.relu(self.fc1(z)) z = z.view(-1, 128, 28, 28) x = torch.relu(self.conv1(z)) x = torch.sigmoid(self.conv2(x)) return x
class GenerativeDecoder(nn.Module): def __init__(self): super(GenerativeDecoder, self).__init__() self.fc1 = nn.Linear(128, 128*28*28) self.conv1 = nn.Conv2d(128, 64, kernel_size=3) self.conv2 = nn.Conv2d(64, 1, kernel_size=3) sketchypath
def forward(self, x): z = self.encoder(x) graphics = self.decoder(z) svg = self.path_renderer(graphics) return svg def forward(self, z): z = torch
def forward(self, x): x = torch.relu(self.conv1(x)) x = torch.relu(self.conv2(x)) x = x.view(-1, 128*28*28) x = torch.relu(self.fc1(x)) return x self).__init__() self.fc1 = nn.Linear(128