bioinf-jku / FCD

Fréchet ChemNet Distance: A quality measure for generative models for molecules
GNU Lesser General Public License v3.0
68 stars 26 forks source link

Shape missmatching #2

Closed miha-skalic closed 6 years ago

miha-skalic commented 6 years ago

Following the tutorial i do following:

mu_chembl, cov_chembl = pickle.load(open("chembl_50k_stats.p", 'rb')).values()
gen_mol_act = get_predictions(gen_mol)

In this case mu_chembl is array of shape (512, 512), and gen_mol_act is of shape(4640, 512)

now, calling calculate_frechet_distance(mu1=np.mean(gen_mol_act, axis=0), mu2=mu_chembl, sigma1=np.cov(gen_mol_act.T), sigma2=cov_chembl) yields an assertion error: Training and test mean vectors have different lengths

Essentially, mu1 is of shape (512, ) while mu2 is of shape (512, 512).

What would be the correct way of solving this?

miha-skalic commented 6 years ago

Problem resolved. I had a bug in loading the data.

mu_chembl is (correctly) of shape (512, ).