9df8cd324207d3924439c3d912229811e34687f0,python/dgl/model_zoo/chem/jtnn/jtnn_vae.py,DGLJTNNVAE,__init__,#DGLJTNNVAE#Any#Any#Any#Any#Any#,34

Before Change


            if vocab_file is None:
                vocab_file = "{}/jtnn/{}.txt".format(
                    get_download_dir(), "vocab")
                self.vocab = Vocab([x.strip("\r\n ")
                                    for x in open(vocab_file)])
            else:
                self.vocab = Vocab([x.strip("\r\n ")
                                    for x in open(vocab_file)])
        else:

After Change


    def __init__(self, hidden_size, latent_size, depth, vocab=None, vocab_file=None):
        super(DGLJTNNVAE, self).__init__()
        if vocab is None:
            if vocab_file is None:
                vocab_file = "{}/jtnn/{}.txt".format(
                    get_download_dir(), "vocab")

            self.vocab = Vocab([x.strip("\r\n ")
                                for x in open(vocab_file)])
        else:
            self.vocab = vocab
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: dmlc/dgl
Commit Name: 9df8cd324207d3924439c3d912229811e34687f0
Time: 2019-09-10
Author: mufeili1996@gmail.com
File Name: python/dgl/model_zoo/chem/jtnn/jtnn_vae.py
Class Name: DGLJTNNVAE
Method Name: __init__


Project Name: RaRe-Technologies/gensim
Commit Name: acf1c19943158789cfbd1a15221612c1ce44abe1
Time: 2015-09-18
Author: radimrehurek@seznam.cz
File Name: gensim/models/word2vec.py
Class Name: Word2Vec
Method Name: load_word2vec_format


Project Name: stanfordnlp/stanza
Commit Name: b89d94957773d49908829272f8c1ac98c6031243
Time: 2018-10-22
Author: zyh@stanford.edu
File Name: models/lemma/data.py
Class Name: DataLoader
Method Name: init_vocab