first commit

This commit is contained in:
stuart committed 2025-12-07 15:05:18 +01:00
1 parent 5037a09608
commit 94815b7918
10 files changed
+181

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
from __future__ import annotations
from dataclasses import dataclass
import torch
@dataclass(frozen=True)
class Embedding:
data: torch.Tensor
def __post_init__(self):
if not isinstance(self.data, torch.Tensor):
raise TypeError(f"data must be a torch.Tensor, got {type(self.data)}")
def compare(self, other: Embedding) -> float:
"""
Compare this embedding with another embedding.
"""
raise NotImplementedError("compare method must be implemented")