def reconstruct(self, smiles, prob_decode=False):
    mol_tree = MolTree(smiles)
    mol_tree.recover()
    (_, tree_vec, mol_vec) = self.encode([mol_tree])
    tree_mean = self.T_mean(tree_vec)
    tree_log_var = (- torch.abs(self.T_var(tree_vec)))
    mol_mean = self.G_mean(mol_vec)
    mol_log_var = (- torch.abs(self.G_var(mol_vec)))
    epsilon = create_var(torch.randn(1, (self.latent_size // 2)), False)
    tree_vec = (tree_mean + (torch.exp((tree_log_var // 2)) * epsilon))
    epsilon = create_var(torch.randn(1, (self.latent_size // 2)), False)
    mol_vec = (mol_mean + (torch.exp((mol_log_var // 2)) * epsilon))
    return self.decode(tree_vec, mol_vec, prob_decode)
def reconstruct(self, smiles, prob_decode=False):
    mol_tree = MolTree(smiles)
    mol_tree.recover()
    (_, tree_vec, mol_vec) = self.encode([mol_tree])
    tree_mean = self.T_mean(tree_vec)
    tree_log_var = (- torch.abs(self.T_var(tree_vec)))
    mol_mean = self.G_mean(mol_vec)
    mol_log_var = (- torch.abs(self.G_var(mol_vec)))
    epsilon = create_var(torch.randn(1, (self.latent_size // 2)), False)
    tree_vec = (tree_mean + (torch.exp((tree_log_var // 2)) * epsilon))
    epsilon = create_var(torch.randn(1, (self.latent_size // 2)), False)
    mol_vec = (mol_mean + (torch.exp((mol_log_var // 2)) * epsilon))
    return self.decode(tree_vec, mol_vec, prob_decode)