Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/OpenNMT/CTranslate2
/ to
Method
to
python/ctranslate2/specs/model_spec.py:643–646 ·
view source on GitHub ↗
(self, dtype: str)
Source
from the content-addressed store, hash-verified
641
raise
NotImplementedError()
642
643
def
to(self, dtype: str) ->
"Variable"
:
644
if
dtype == self.dtype:
645
return
self
646
return
self._to(dtype)
647
648
@abc.abstractmethod
649
def
numpy(self) -> np.ndarray:
Callers
7
register_storage_view
Function · 0.45
test_transformers_encoder
Function · 0.45
test_transformers_lm_forward
Method · 0.45
test_storageview_conversion
Function · 0.45
_quantize
Method · 0.45
_to
Method · 0.45
_to
Method · 0.45
Calls
1
_to
Method · 0.95
Tested by
3
test_transformers_encoder
Function · 0.36
test_transformers_lm_forward
Method · 0.36
test_storageview_conversion
Function · 0.36