Skip to content

Commit

Permalink
KL divergence fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wenhao-gao committed Dec 21, 2021
1 parent 99a808e commit 6e46fbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tdc/chem_utils/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def canonical(smiles):
training_lst_mol = list(map(canonical, training_smiles_lst))
filter_out_func = lambda x:x is not None
generated_lst_mol = list(filter(filter_out_func, generated_lst_mol))
training_lst_mol = list(filter(filter_out_func, generated_lst_mol))
training_lst_mol = list(filter(filter_out_func, training_lst_mol))

d_sampled = calculate_pc_descriptors(generated_lst_mol, pc_descriptor_subset)
d_chembl = calculate_pc_descriptors(training_lst_mol, pc_descriptor_subset)
Expand Down Expand Up @@ -420,4 +420,4 @@ def fcd_distance(generated_smiles_lst, training_smiles_lst):
except:
raise ImportError("Please install fcd by 'pip install FCD' (for Tensorflow backend) \
or 'pip install fcd_torch' (for PyTorch backend)!")
return fcd_distance_tf(generated_smiles_lst, training_smiles_lst)
return fcd_distance_tf(generated_smiles_lst, training_smiles_lst)

0 comments on commit 6e46fbd

Please sign in to comment.