Commit d7c1bfd2 authored by Jakob Knollmüller's avatar Jakob Knollmüller
Browse files

fix

parent b8759ef9
Pipeline #94632 failed with stages
in 5 minutes and 22 seconds
......@@ -95,8 +95,8 @@ if __name__ == '__main__':
fullcov_model = ift.FullCovarianceModel(H.domain)
meanfield_model = ift.MeanfieldModel(H.domain)
position_fc = fullcov_model.get_initial_pos()
position_mf = meanfield_model.get_initial_pos()
position_fc = fullcov_model.get_initial_pos(initial_sig=0.1)
position_mf = meanfield_model.get_initial_pos(initial_sig=0.1)
KL_fc = ift.ParametricGaussianKL.make(position_fc,H,fullcov_model,3,True)
KL_mf = ift.ParametricGaussianKL.make(position_mf,H,meanfield_model,3,True)
......
......@@ -67,7 +67,7 @@ class FullCovarianceModel():
def get_initial_pos(self, initial_mean = None, initial_sig = 1):
initial_pos = from_random(self.generator.domain).to_dict()
initial_pos['latent'] = full(self.generator.domain['latent'], 0.)
diag_tri = np.diag(np.full(self.flat_domain.shape[0]), initial_sig)[np.tril_indices(self.flat_domain.shape[0])]
diag_tri = np.diag(np.full(self.flat_domain.shape[0],initial_sig))[np.tril_indices(self.flat_domain.shape[0])]
initial_pos['cov'] = makeField(self.generator.domain['cov'], diag_tri)
if initial_mean is None:
initial_mean = 0.1*from_random(self.generator.target)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment