def __init__(self): super(DirModel, self).__init__() self.conv1 = utils.GraphConv1x1(3, 64, batch_norm=None) for i in range(5): module = utils.DirResNet2(64) self.add_module("rn{}".format(i), module) self.bn_conv2 = utils.GraphConv1x1(64, 64, batch_norm="pre") self.fc1 = nn.Linear(64, 10)
def __init__(self): super(DirEncoder, self).__init__() self.conv1 = utils.GraphConv1x1(3, 128, batch_norm=None) self.num_layers = 5 for i in range(self.num_layers): module = utils.DirResNet2(128) self.add_module("rn{}".format(i), module) self.bn_conv2 = utils.GraphConv1x1(128, 128, batch_norm="pre") self.fc_mu = nn.Linear(128, 100) self.fc_logvar = nn.Linear(128, 100)
def __init__(self): super(DirDecoder, self).__init__() self.conv_inputs = utils.GraphConv1x1(3, 128, batch_norm=None) self.conv_noise = utils.GraphConv1x1(100, 128, batch_norm=None) self.num_layers = 5 for i in range(self.num_layers): module = utils.DirResNet2(128) self.add_module("rn{}".format(i), module) self.bn_conv2 = utils.GraphConv1x1(128, 128, batch_norm="pre") self.fc_mu = utils.GraphConv1x1(128, 3, batch_norm=None) self.fc_logvar = nn.Parameter(torch.zeros(1, 1, 1))
def __init__(self): super(DirModel, self).__init__() self.conv1 = utils.GraphConv1x1(6, 128, batch_norm=None) for i in range(15): if i % 2 == 0: module = utils.DirResNet2(128) else: module = utils.AvgResNet2(128) self.add_module("rn{}".format(i), module) self.do = nn.Dropout2d() self.conv2 = utils.GraphConv1x1(128, 120, batch_norm="pre")