ufoym / imbalanced-dataset-sampler

A (PyTorch) imbalanced dataset sampler for oversampling low frequent classes and undersampling high frequent ones.
MIT License
2.27k stars 264 forks source link

Imbalanced dataset sampler w/ crossentropyloss not importing on google colab #17

Open gnai opened 4 years ago

gnai commented 4 years ago

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

dezoito commented 4 years ago

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/
ricglz commented 3 years ago

You could also do

pip install git+https://github.com/ufoym/imbalanced-dataset-sampler
robinzhaorr commented 3 years ago

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