How to use the deeprank.dataset.DataLoader 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
F = np.zeros((len(d2_list), config['feat_size']), dtype=np.float32)
            X1[:] = config['fill_word']
            X2[:] = config['fill_word']
            d1_len = min(config['data1_maxlen'], len(data1[d1]))
            for j, (l, d2) in enumerate(d2_list):
                d2_len = min(config['data2_maxlen'], len(data2[d2]))
                X1[j, :d1_len], X1_len[j] = data1[d1][:d1_len], d1_len
                X2[j, :d2_len], X2_len[j] = data2[d2][:d2_len], d2_len
                Y[j] = l
                X1_id[j], X2_id[j] = d1, d2
                #F[j] = features[(d1, d2)]
            yield X1, X1_len, X1_id, X2, X2_len, X2_id, Y, F


if __name__ == '__main__':
    loader = DataLoader('./config/letor07_mp_fold1.model')

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