srijaydeshpande commited on
Commit
37f7090
·
verified ·
1 Parent(s): 74b9e6d

Update vq_vae.py

Browse files
Files changed (1) hide show
  1. vq_vae.py +1 -25
vq_vae.py CHANGED
@@ -1,7 +1,7 @@
1
  import matplotlib.pyplot as plt
2
  import numpy as np
3
  import os, cv2
4
- import imageio, glob
5
  import torch
6
  import torch.nn as nn
7
  import torch.nn.functional as F
@@ -365,30 +365,6 @@ class Pix2PixGenerator(nn.Module):
365
  nn.Tanh(),
366
  )
367
 
368
- # self.down1 = UNetDown(in_channels, 16, normalize=False)
369
- # self.down2 = UNetDown(16, 32)
370
- # self.down3 = UNetDown(32, 64)
371
- # self.down4 = UNetDown(64, 128, dropout=0.5)
372
- # self.down5 = UNetDown(128, 256, dropout=0.5)
373
- # self.down6 = UNetDown(256, 512, dropout=0.5)
374
- # self.down7 = UNetDown(512, 512, dropout=0.5)
375
- # self.down8 = UNetDown(512, 512, normalize=False, dropout=0.5)
376
- #
377
- # self.up1 = UNetUp(512, 512, dropout=0.5)
378
- # self.up2 = UNetUp(1024, 512, dropout=0.5)
379
- # self.up3 = UNetUp(1024, 256, dropout=0.5)
380
- # self.up4 = UNetUp(512, 128, dropout=0.5)
381
- # self.up5 = UNetUp(256, 64)
382
- # self.up6 = UNetUp(128, 32)
383
- # self.up7 = UNetUp(64, 16)
384
- #
385
- # self.final = nn.Sequential(
386
- # nn.Upsample(scale_factor=2),
387
- # nn.ZeroPad2d((1, 0, 1, 0)),
388
- # nn.Conv2d(32, out_channels, 4, padding=1),
389
- # nn.Tanh(),
390
- # )
391
-
392
 
393
  def forward(self, x):
394
  # U-Net generator with skip connections from encoder to decoder
 
1
  import matplotlib.pyplot as plt
2
  import numpy as np
3
  import os, cv2
4
+ import glob
5
  import torch
6
  import torch.nn as nn
7
  import torch.nn.functional as F
 
365
  nn.Tanh(),
366
  )
367
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
368
 
369
  def forward(self, x):
370
  # U-Net generator with skip connections from encoder to decoder