Skip to content

Commit 24c2676

Browse files
committed
Add CGRTensor to functional embeddings
Allow its usage in level and circular embeddings as done with MCRTensor.
1 parent e4d1e99 commit 24c2676

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torchhd/functional.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def level(
364364
device=span_hv.device,
365365
).as_subclass(vsa_tensor)
366366

367-
if vsa == "BSBC" or vsa == "MCR":
367+
if vsa == "BSBC" or vsa == "MCR" or vsa == "CGR":
368368
hv.block_size = span_hv.block_size
369369

370370
for i in range(num_vectors):
@@ -591,7 +591,7 @@ def circular(
591591
device=span_hv.device,
592592
).as_subclass(vsa_tensor)
593593

594-
if vsa == "BSBC" or vsa == "MCR":
594+
if vsa == "BSBC" or vsa == "MCR" or vsa == "CGR":
595595
hv.block_size = span_hv.block_size
596596

597597
mutation_history = deque()

0 commit comments

Comments
 (0)