Apply model.predict on xarray Dataset

71 views
Skip to first unread message

Souhail Aboulfadile

unread,
Jun 5, 2021, 3:39:35 PM6/5/21
to xarray
I trained a model on the time dimension of my dataset. The model  takes in input 6 values of shape:  input_shape = (None, 6, 1) and outputs one value.

I want to make the prediction on every pixel (lat, lon) for the past 6 timesteps.

I tried stacking the dataset on every point (lat, lon) and grouping it on this dimension before appying the function using xr.apply_ufunc. However, I still get that error of dimensions.

I am sure this is a common problem but still cant figure out how to fix.

Any help would be appreciated!

Maximilian Roos

unread,
Jun 7, 2021, 10:45:41 PM6/7/21
to xarray
Hi Souhail — if this is still an issue — we've moved questions to GitHub discussions — feel free to post a question there: https://github.com/pydata/xarray/discussions/5404
Reply all
Reply to author
Forward
0 new messages