ufoym / imbalanced-dataset-sampler

A (PyTorch) imbalanced dataset sampler for oversampling low frequent classes and undersampling high frequent ones.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Imbalanced dataset sampler w/ crossentropyloss not importing on google colab

gnai opened this issue · comments

commented

Hello, Im trying to import the module on google colab but im getting a no module found error, someone fixed this?
I also tried to install with !pip install torchsampler.

Thanks

Were you able to solve this?

UPDATE: this works for me

!git clone https://github.com/ufoym/imbalanced-dataset-sampler.git
%cd /content/imbalanced-dataset-sampler
!pip install .
%cd /content/

You could also do

pip install git+https://github.com/ufoym/imbalanced-dataset-sampler

You could also do

pip install git+https://github.com/ufoym/imbalanced-dataset-sampler

!pip install git+https://github.com/ufoym/imbalanced-dataset-sampler

For Google Colab