MCPcopy 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
457def _long_tensor(tok_lst):
458 return torch.tensor(tok_lst, dtype=torch.long, device=torch_device,)
459
460
461TOLERANCE = 1e-3

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected