Skip to content

Add tests for the embedding module #126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Mar 1, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update test
  • Loading branch information
pereverges committed Mar 1, 2023
commit e137ee4eaeec0e208284ae77e610e67c588b0d74
4 changes: 2 additions & 2 deletions torchhd/tests/test_embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def test_dtype(self, vsa):
def test_value(self, vsa):
if vsa == "BSC" or vsa == "FHRR":
return
in_features = 100000
in_features = 1000000
out_features = 100
emb = embeddings.Projection(in_features, out_features, vsa=vsa)
assert abs(torchhd.cosine_similarity(emb.weight[0], emb.weight[1])) < 0.5e-2
Expand Down Expand Up @@ -442,7 +442,7 @@ def test_dtype(self, vsa):
def test_value(self, vsa):
if vsa == "HRR":
return
dimensions = 10000
dimensions = 100000
embedding = 10
emb = embeddings.Density(embedding, dimensions, vsa=vsa)
return (
Expand Down