Skip to content

Instantly share code, notes, and snippets.

View KangolHsu's full-sized avatar

KangolHsu KangolHsu

  • Beijing , China
View GitHub Profile
import torch
import torch.nn as nn
import torch.nn.parallel
class DCGAN_D(nn.Container):
def __init__(self, isize, nz, nc, ndf, ngpu, n_extra_layers=0):
super(DCGAN_D, self).__init__()
self.ngpu = ngpu
assert isize % 16 == 0, "isize has to be a multiple of 16"