Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tensor dimension and order issues in data workflow #83

Open
yingkaisha opened this issue Aug 18, 2024 · 0 comments
Open

Tensor dimension and order issues in data workflow #83

yingkaisha opened this issue Aug 18, 2024 · 0 comments

Comments

@yingkaisha
Copy link
Collaborator

yingkaisha commented Aug 18, 2024

  • In credit.data, the ERA5_and_Forcing_Dataset class produces xarray.Dataset with dimensions of [time, level, latitude, longitude]
  • In credit.transforms, class ToTensor_ERA5_and_Forcing collects xarray.Dataset variables and produces tensors of [time, var, level, lat, lon]
  • In credit.trainers, the Trainer class in trainerERA5_v2.py collects [batch, time, var, level, lat, lon] from the dataloader and permute it to [batch, var, time, level, lat, lon]

The entire process above can be handled better with ToTensor_ERA5_and_Forcing produces [var, time, level, lat, lon]. This will avoid the tensor permutation in trainerERA5_v2.py.

Also note that all current models (their embedding layers) take [batch, var, time, lat, lon] tensors with "channel-first" and patch_size = [patch_time, patch_lat, patch_lon]. The improved data workflow needs to be compatible with this model requirement.

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

No branches or pull requests

1 participant