Skip to content

Fix dataloader normalization edge cases and tensor conversion robustness (fixes #145)#214

Open
kamalahasiniburra wants to merge 1 commit intoML4SCI:mainfrom
kamalahasiniburra:fix-dataloader-robustness
Open

Fix dataloader normalization edge cases and tensor conversion robustness (fixes #145)#214
kamalahasiniburra wants to merge 1 commit intoML4SCI:mainfrom
kamalahasiniburra:fix-dataloader-robustness

Conversation

@kamalahasiniburra
Copy link
Copy Markdown

…ess (fixes #145)## Summary
Addresses Issue #145. This PR adds robust dataloader utilities that handle normalization edge cases and tensor conversion issues.

Features

  • safe_to_tensor(): Safely converts lists, scalars, non-contiguous arrays, handles NaN/Inf
    • robust_normalize(): Handles constant images (zero variance), NaN inputs, per-channel normalization
    • create_data_pipeline(): Composable transform pipeline
    • validate_batch(): Validates batch for NaN/Inf, shape mismatches, label count mismatches

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