VSATensor

class torchhd.VSATensor[来源]

基类

每个模型都必须实现此基类上指定的方法。

bind(other: VSATensor) VSATensor[来源]

将超向量与其他绑定

bundle(other: VSATensor) VSATensor[来源]

将超向量与其他捆绑

cosine_similarity(others: VSATensor) Tensor[来源]

与其他超向量的余弦相似度

dot_similarity(others: VSATensor) Tensor[来源]

与其他超向量的内积

classmethod empty(num_vectors: int, dimensions: int, *, dtype=None, device=None) VSATensor[来源]

创建表示空集的超向量

classmethod identity(num_vectors: int, dimensions: int, *, dtype=None, device=None) VSATensor[来源]

创建用于绑定的身份超向量

inverse() VSATensor[来源]

反转超向量以进行绑定

multibind() VSATensor[来源]

绑定多个超向量

multibundle() VSATensor[来源]

捆绑多个超向量

negative() VSATensor[来源]

对超向量进行取反以实现捆绑逆操作

normalize() VSATensor[来源]

归一化超向量

permute(shifts: int = 1) VSATensor[来源]

置换超向量

classmethod random(num_vectors: int, dimensions: int, *, dtype=None, device=None, generator=None) VSATensor[来源]

创建随机或不相关的高维向量