Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/huggingface/transformers
/ _long_tensor
Function
_long_tensor
tests/test_modeling_mobilebert.py:457–458 ·
view source on GitHub ↗
(tok_lst)
Source
from the content-addressed store, hash-verified
455
456
457
def
_long_tensor(tok_lst):
458
return
torch.tensor(tok_lst, dtype=torch.long, device=torch_device,)
459
460
461
TOLERANCE = 1e-3
Callers
1
test_inference_no_head
Method · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected