def init_semicldc_cond_gmix_transadd(self, params):
        # trans one_hot_y to dense_y, then add dense_y to z1
        self.leakyrelu = nn.LeakyReLU()
        self.yohtoy_toz2 = nn.Linear(self.label_size, params.z_dim)
        self.hbn_z1y = nn.BatchNorm1d(params.z_dim)
        self.z1y_z2 = Inferer(params, in_dim=params.z_dim)

        self.y_z2 = Inferer(params, in_dim=params.cldc_label_size)
        self.z2y_z1 = Inferer(params, in_dim=params.z_dim)
 def init_semicldc_cond_gmix(self, params):
     # concat
     # concat z1 and y
     self.z1y_z2 = Inferer(params, in_dim=params.z_dim + self.label_size)
     # p(z2 | y)
     self.y_z2 = Inferer(params, in_dim=self.label_size)
     # p(z1 | z2)
     self.z2y_z1 = Inferer(params, in_dim=params.z_dim)
     '''
    def init_semicldc_cond_gmix_transadd(self, params):
        self.init_semicldc_cond_transadd(params)

        # y -> hid for z2
        self.ytohid_z2 = nn.Linear(self.label_size, params.aux_hid_dim)
        # y -> z2
        self.hbn_y = nn.BatchNorm1d(params.aux_hid_dim)
        self.y_z2 = Inferer(params, in_dim=params.aux_hid_dim)
    def init_semicldc_cond_transadd(self, params):
        self.leakyrelu = nn.LeakyReLU()

        # x -> hid for y
        self.xtohid_y = nn.Linear(params.x_hid_dim, params.aux_hid_dim)
        # z1 -> hid for y
        self.z1tohid_y = nn.Linear(params.z_dim, params.aux_hid_dim)
        self.hbn_z1x = nn.BatchNorm1d(params.aux_hid_dim)

        # x -> hid for z2
        self.xtohid_z2 = nn.Linear(params.x_hid_dim, params.aux_hid_dim)
        # z1 -> hid for z2
        self.z1tohid_z2 = nn.Linear(params.z_dim, params.aux_hid_dim)
        # y -> hid for z2
        self.ytohid_z2 = nn.Linear(self.label_size, params.aux_hid_dim)
        # z1,y,x -> z2
        self.hbn_z1xy = nn.BatchNorm1d(params.aux_hid_dim)
        self.z1yx_z2 = Inferer(params, in_dim=params.aux_hid_dim)

        # y -> hid for z1
        self.ytohid_z1 = nn.Linear(self.label_size, params.aux_hid_dim)
        # z2 -> hid for z1
        self.z2tohid_z1 = nn.Linear(params.z_dim, params.aux_hid_dim)
        # y,z2 -> z1
        self.hbn_z2y = nn.BatchNorm1d(params.aux_hid_dim)
        self.z2y_z1 = Inferer(params, in_dim=params.aux_hid_dim)

        # y -> hid for x
        self.ytohid_x = nn.Linear(self.label_size, params.aux_hid_dim)
        # z1 -> hid for x
        self.z1tohid_x = nn.Linear(params.z_dim, params.aux_hid_dim)
        # z2 -> hid for x
        self.z2tohid_x = nn.Linear(params.z_dim, params.aux_hid_dim)
        # y,z2,z1 -> x
        self.hbn_z2z1y = nn.BatchNorm1d(params.aux_hid_dim)
        self.z2z1y_x = nn.Linear(params.aux_hid_dim, params.z_dim)
 def init_semicldc_cond_transconcat(self, params):
     # trans one hot y to dense y, then concat z1 and y
     self.yohtoy = nn.Linear(self.label_size, params.z_dim)
     self.z1y_z2 = Inferer(params, in_dim=params.z_dim + params.z_dim)
     self.z2y_z1 = Inferer(params, in_dim=params.z_dim + params.z_dim)
 def init_semicldc_cond_concat(self, params):
     # concat directly z1 and one hot y
     self.z1y_z2 = Inferer(params, in_dim=params.z_dim + self.label_size)
     self.z2y_z1 = Inferer(params, in_dim=params.z_dim + self.label_size)