JaggedTensorWithTimestamp
Function
This API is a class extended from JaggedTensor and is used to represent a jagged tensor with timestamp information. This class adds the _timestamps attribute based on the JaggedTensor class to store the timestamp information corresponding to values. Used to calculate the time during feature elimination.
Prototype
1 2 3 4 5 6 7 8 9 | class JaggedTensorWithTimestamp(ExtendedJaggedTensor): def __init__( self, values: torch.Tensor, weights: Optional[torch.Tensor] = None, lengths: Optional[torch.Tensor] = None, offsets: Optional[torch.Tensor] = None, timestamps: Optional[torch.Tensor] = None, ) -> None: |
Parameters
Parameter |
Data Type |
Mandatory/Optional |
Description |
|---|---|---|---|
values |
torch.Tensor |
Mandatory |
Indicates the value of the jagged tensor. |
weights |
torch.Tensor |
Optional |
Indicates the weight of each value. The default value is None. |
lengths |
torch.Tensor |
Optional |
Indicates the length of each sample. The default value is None. |
offsets |
torch.Tensor |
Optional |
Indicates the start offset of each sample. The default value is None. |
timestamps |
torch.Tensor |
Optional |
Indicates the timestamp corresponding to values. The default value is None. |