Interpolation¶
- class Interpolation(*args, **kwargs)[source]¶
Bases:
ProtocolCallable used to interpolate in time between two tensors.
Here,
prev_dataandnext_datashould be the nearest two observations, andsample_atshould be the length of time, sinceprev_datawas observered, from which to sample.step_timeis the total length of time between the observationsprev_dataandnext_data.The result is a single tensor, shaped like
prev_dataandnext_data, containing the interpolated data.- Parameters:
prev_data (torch.Tensor) – most recent observation prior to sample time.
next_data (torch.Tensor) – most recent observation subsequent to sample time.
sample_at (torch.Tensor) – relative time at which to sample data.
step_time (float) – length of time between the prior and subsequent observations.
- Returns:
interpolated data at sample time.
- Return type: