
Assemble a 4D input tensor-ready array from a synthetic cube
Source:R/temporal_cube.R
temporal_cube_to_tensor.RdPackages temporal_synth_soc_cube()'s output into the
(batch, T, C, H, W) array shape expected by
temporal_convlstm_fit(), with two channels:
static elevation (broadcast along time);
dynamic precipitation.
Also returns the target SOC array in (batch, T, H, W) form.
Arguments
- cube
List returned by
temporal_synth_soc_cube().- t_slice
Optional integer vector with time indices to include (default = all months). Useful to split train / forecast windows.