Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/huggingface/transformers
/ _long_tensor
Function
_long_tensor
tests/test_modeling_bart.py:549–550 ·
view source on GitHub ↗
(tok_lst)
Source
from the content-addressed store, hash-verified
547
548
549
def
_long_tensor(tok_lst):
550
return
torch.tensor(tok_lst, dtype=torch.long, device=torch_device)
551
552
553
TOLERANCE = 1e-4
Callers
5
test_enro_forward
Method · 0.70
test_sequence_classification_forward
Method · 0.70
test_prepare_bart_decoder_inputs
Method · 0.70
test_inference_no_head
Method · 0.70
test_mnli_inference
Method · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected