jerryji1993 / DNABERT

DNABERT: pre-trained Bidirectional Encoder Representations from Transformers model for DNA-language in genome

Home Page:https://doi.org/10.1093/bioinformatics/btab083

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sampling of Training Dataset via WeightedRandomSampler for Imbalanced Classes

mosala777 opened this issue · comments

Hello, I wanted to ask if it is possible to use weighted random sampling for cases of imbalanced datasets? I tried replacing the sampling methods but the tensor dataset for training_dataset is not matching correctly and gives the error: "IndexError: too many indices for tensor of dimension 2."

I think I am missing something in the script. Would appreciate if you could help.

Thank you!