mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-01 02:31:11 +06:00
Fix small type hinting error (#7820)
* Fix small type hinting error * Update tokenization_utils_base.py * Update src/transformers/tokenization_utils_base.py Co-authored-by: Lysandre Debut <lysandre@huggingface.co> Co-authored-by: Lysandre Debut <lysandre@huggingface.co>
This commit is contained in:
parent
b86a71ea38
commit
406a49dfe4
@ -602,7 +602,7 @@ class BatchEncoding(UserDict):
|
|||||||
return self
|
return self
|
||||||
|
|
||||||
@torch_required
|
@torch_required
|
||||||
def to(self, device: str) -> "BatchEncoding":
|
def to(self, device: Union[str, "torch.device"]) -> "BatchEncoding":
|
||||||
"""
|
"""
|
||||||
Send all values to device by calling :obj:`v.to(device)` (PyTorch only).
|
Send all values to device by calling :obj:`v.to(device)` (PyTorch only).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user