BioinfoMachineLearning / DeepInteract

A geometric deep learning pipeline for predicting protein interface contacts. (ICLR 2022)
https://zenodo.org/record/6671582
GNU General Public License v3.0
62 stars 11 forks source link

what does this code mean? #15

Closed onlyonewater closed 2 years ago

onlyonewater commented 2 years ago

what does this code mean?It seems to be used during data loader.

https://github.com/BioinfoMachineLearning/DeepInteract/blob/c78d205465f02ee4ef751dbbafb7ec8f30c75c9a/project/datasets/DIPS/dips_dgl_dataset.py#L137-L141

amorehead commented 2 years ago

Hi, @onlyonewater.

This code allows one to create a separate dataloader dedicated to loading the same input example during training/validation to visualizate model predictions (e.g., visualizing distance matrices or contact maps as 2D images). The reason one may want to do so is to be guaranteed that one can always index into this "visualization" dataloader without running into an out-of-bounds error (achieved by duplicating the same example "n" times). Then, one Line 92 here, you can see where we create this dedicated "visualization" dataloader/dataset.

I hope this clarifies matters.

onlyonewater commented 2 years ago

ok, I get it, thanks!!