# Stack Overflow [pytorch]: How to handle class imbalance in PyTorch when using ImageFolder for medical image classification? — retained record

> Retained stackexchange record from stackexchange.

Canonical: https://highsignal.app/data/records/c2092a8c7ab25f29

[← sources](https://highsignal.app/data)


source: [stackexchange](https://highsignal.app/data/stackexchange) published 2026-06-15 03:25 ingested 2026-06-28 12:39

[original source ↗](https://stackoverflow.com/questions/79958966/how-to-handle-class-imbalance-in-pytorch-when-using-imagefolder-for-medical-imag)

## retained text



```
Score: 2 | Answers: 2 | Views: 133
Tags: python, pytorch
How to handle class imbalance in PyTorch when using ImageFolder for medical image classification?
```



document fetched 2026-07-14 07:54
