Exemple #1
0
    def initialize_networks(self):
    	""" Initialize all model networks """
	if self.x_dist == 'Gaussian':
      	    self.px_yz = dgm.initGaussNet(self.n_z+self.n_y, self.n_hid, self.n_x, 'px_yz_')
	elif self.x_dist == 'Bernoulli':
	    self.px_yz = dgm.initCatNet(self.n_z+self.n_y, self.n_hid, self.n_x, 'px_yz_')
    	self.qz_xy = dgm.initGaussNet(self.n_x+self.n_y, self.n_hid, self.n_z, 'qz_xy_')
    	self.qy_x = dgm.initCatNet(self.n_x, self.n_hid, self.n_y, 'qy_x_') # recognition network
    	self.py_x = bnn.initTiedBNN(self.qy_x, self.n_hid, self.initVar, 'py_x_', 'Categorical') # discriminator
Exemple #2
0
    def initialize_networks(self):
    	""" Initialize all model networks """
	if self.x_dist == 'Gaussian':
      	    self.px_z = dgm.initGaussNet(self.n_z, self.n_hid, self.n_x, 'px_z_')
	elif self.x_dist == 'Bernoulli':
	    self.px_z = dgm.initCatNet(self.n_z, self.n_hid, self.n_x, 'px_z_')
    	self.qz_x = dgm.initGaussNet(self.n_x, self.n_hid, self.n_z, 'qz_x_')
    	self.qy_xz = dgm.initCatNet(self.n_x+self.n_z, self.n_hid, self.n_y, 'qy_xz_')
	self.py_xz = dgm.initCatNet(self.n_x+self.n_z, self.n_hid, self.n_y, 'py_xz_')
Exemple #3
0
 def initialize_networks(self):
     """ Initialize all model networks """
     if self.x_dist == 'Gaussian':
         self.px_yza = dgm.initGaussNet(self.n_y + self.n_z + self.n_a,
                                        self.n_hid, self.n_x, 'px_yza_')
     elif self.x_dist == 'Bernoulli':
         self.px_yza = dgm.initCatNet(self.n_y + self.n_z + self.n_a,
                                      self.n_hid, self.n_x, 'px_yza_')
     self.pa_yz = dgm.initGaussNet(self.n_y + self.n_z, self.n_hid,
                                   self.n_a, 'pa_yz_')
     self.qz_xya = dgm.initGaussNet(self.n_x + self.n_y + self.n_a,
                                    self.n_hid, self.n_z, 'qz_xya_')
     self.qa_x = dgm.initGaussNet(self.n_x, self.n_hid, self.n_a, 'qa_x_')
     self.qy_xa = dgm.initCatNet(self.n_x + self.n_a, self.n_hid, self.n_y,
                                 'qy_xa_')
Exemple #4
0
    def initialize_networks(self):
    	""" Initialize all model networks """
	if self.x_dist == 'Gaussian':
      	    self.px_z = dgm.initGaussNet(self.n_z, self.n_hid, self.n_x, 'px_z_')
	elif self.x_dist == 'Bernoulli':
	    self.px_z = dgm.initCatNet(self.n_z, self.n_hid, self.n_x, 'px_y_')
      	self.pz_c = dgm.initGaussNet(self.n_c, self.n_hid, self.n_z, 'pz_c_')
    	self.qc_x = dgm.initStatNet(self.n_x, self.n_hid, self.n_e, self.n_c, 'qc_x_')
    	self.qz_xc = dgm.initGaussNet(self.n_x+self.n_c, self.n_hid, self.n_z, 'qz_xc_')
Exemple #5
0
 def initialize_networks(self):
     """ Initialize all model networks """
     if self.x_dist == 'Gaussian':
         self.px_yza = dgm.initGaussNet(self.n_y + self.n_z + self.n_a,
                                        self.n_hid, self.n_x, 'px_yza_')
     elif self.x_dist == 'Bernoulli':
         self.px_yza = dgm.initCatNet(self.n_y + self.n_z + self.n_a,
                                      self.n_hid, self.n_x, 'px_yza_')
     self.pa_yz = dgm.initGaussNet(self.n_y + self.n_z, self.n_hid,
                                   self.n_a, 'pa_yz_')
     self.qz_xya = dgm.initGaussNet(self.n_x + self.n_y + self.n_a,
                                    self.n_hid, self.n_z, 'qz_xya_')
     self.qa_x = dgm.initGaussNet(self.n_x, self.n_hid, self.n_a, 'qa_x_')
     self.pa_x = dgm.initTiedNetwork(self.qa_x, self.n_hid, 'pa_x_',
                                     'Gauss')
     self.qy_xa = dgm.initCatNet(self.n_x + self.n_a, self.n_hid, self.n_y,
                                 'qy_xa_')
     self.py_xa = bnn.initTiedBNN(self.qy_xa, self.n_hid, self.initVar,
                                  'py_xa_', 'Categorical')