How to use the deeprank.utils.convert_embed_2_numpy function in deeprank

To help you get started, we’ve selected a few deeprank examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pl8787 / DeepRank_PyTorch / deeprank / dataset.py View on Github external
self.feat_size = self.config['feat_size']

        self._PAD_ = len(self.word_dict)
        self.word_dict[self._PAD_] = '[PAD]'
        self.iword_dict['[PAD]'] = self._PAD_

        self.embed_dict[self._PAD_] = np.zeros((50, ), dtype=np.float32)
        self.W_init_embed = np.float32(
            np.random.uniform(-0.02, 0.02, [len(self.word_dict), 50]))
        self.embedding = utils.convert_embed_2_numpy(
            self.embed_dict, embed = self.W_init_embed)

        self.W_init_idf = np.float32(
            np.zeros([len(self.word_dict), 1]))
        self.idf_embedding = utils.convert_embed_2_numpy(
            self.idf_dict, embed = self.W_init_idf)
github pl8787 / DeepRank_PyTorch / deeprank / dataset.py View on Github external
filename=self.Letor07Path + '/docid_doc.txt')
        self.embed_dict = utils.read_embedding(
            filename=self.Letor07Path + '/embed_wiki-pdc_d50_norm')
        self.idf_dict = utils.read_embedding(
            filename=self.Letor07Path + '/embed.idf')

        self.feat_size = self.config['feat_size']

        self._PAD_ = len(self.word_dict)
        self.word_dict[self._PAD_] = '[PAD]'
        self.iword_dict['[PAD]'] = self._PAD_

        self.embed_dict[self._PAD_] = np.zeros((50, ), dtype=np.float32)
        self.W_init_embed = np.float32(
            np.random.uniform(-0.02, 0.02, [len(self.word_dict), 50]))
        self.embedding = utils.convert_embed_2_numpy(
            self.embed_dict, embed = self.W_init_embed)

        self.W_init_idf = np.float32(
            np.zeros([len(self.word_dict), 1]))
        self.idf_embedding = utils.convert_embed_2_numpy(
            self.idf_dict, embed = self.W_init_idf)

deeprank

Rank Protein-Protein Interactions using Deep Learning

Apache-2.0
Latest version published 3 years ago

Package Health Score

48 / 100
Full package analysis

Similar packages