昇腾社区首页
中文
注册
开发者
下载

KeyedJaggedTensorWithTimestamp

功能描述

该接口是一个扩展自KeyedJaggedTensor的类,用于表示带有时间戳信息的Keyed Jagged Tensor。该类在KeyedJaggedTensor的基础上增加了一个_timestamps属性,存储与values对应的时间戳信息。用于特征淘汰时计算时间。

函数原型

1
def from_jt_dict(jt_dict: Dict[str, JaggedTensorWithTimestamp]) -> "KeyedJaggedTensorWithTimestamp"

参数说明

参数名

类型

可选/必选

说明

jt_dict

Dict[str, JaggedTensorWithTimestamp]

必选

特征名称和对应的JaggedTensorWithTimestamp组成的字典。长度不能为0。其中JaggedTensorWithTimestamp的取值范围参考JaggedTensor(TorchRec)