Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/OpenNMT/CTranslate2
/ _equal
Method
_equal
python/ctranslate2/specs/model_spec.py:764–767 ·
view source on GitHub ↗
(self, other)
Source
from the content-addressed store, hash-verified
762
return
self
763
764
def
_equal(self, other) -> bool:
765
a = self.tensor
766
b = other.tensor
767
return
a is b or (a.dtype == b.dtype and torch.equal(a, b))
Callers
nothing calls this directly
Calls
1
equal
Method · 0.80
Tested by
no test coverage detected