MCPcopy 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
549def _long_tensor(tok_lst):
550 return torch.tensor(tok_lst, dtype=torch.long, device=torch_device)
551
552
553TOLERANCE = 1e-4

Calls

no outgoing calls

Tested by

no test coverage detected