基本特征存储
- class dgl.graphbolt.BasicFeatureStore(features: Dict[Tuple[str, str, str], Feature])[source]
基础类:
FeatureStore
一个基本的功能存储,用于管理多个功能以供访问。
- update(domain: str, type_name: str, feature_name: str, value: Tensor, ids: Tensor | None = None)[source]
更新特征存储。
- Parameters:
domain (str) – The domain of the feature such as “node”, “edge” or “graph”.
type_name (str) – The node or edge type name.
feature_name (str) – The feature name.
value (torch.Tensor) – 特征的更新值。
ids (torch.Tensor, optional) – 要更新的特征的索引。如果指定,则只更新特征的指定索引。对于特征,ids[i] 行将更新为 value[i]。因此,索引和值必须具有相同的长度。如果为 None,则将更新整个特征。