Skip to content

Comments

Improve dataloader robustness with safe normalization and consistent tensor conversion#147

Open
SarthakJagota wants to merge 2 commits intoML4SCI:mainfrom
SarthakJagota:fix-dataloader-robustness
Open

Improve dataloader robustness with safe normalization and consistent tensor conversion#147
SarthakJagota wants to merge 2 commits intoML4SCI:mainfrom
SarthakJagota:fix-dataloader-robustness

Conversation

@SarthakJagota
Copy link

This PR improves the reliability of the dataloader used in the DeepLense pipeline.

Changes

  1. Added a safety check in the normalization step to prevent division-by-zero errors for constant images

  2. Ensured the dataset consistently returns torch.Tensor objects even when transforms are not applied

  3. Verified that the dataloader runs successfully after these changes

These updates improve reproducibility and make the pipeline more robust across different datasets and environments.

Fixes #145

Address review: add epsilon normalization, enforce float32, include sanity check for constant images
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dataloader normalization edge case and tensor conversion robustness

1 participant