MCPcopy Create free account
hub / github.com/huggingface/transformers / to

Method to

src/transformers/tokenization_utils_base.py:522–525  ·  view source on GitHub ↗

Send all values to device by calling v.to(device)

(self, device: str)

Source from the content-addressed store, hash-verified

520
521 @torch_required
522 def to(self, device: str):
523 """Send all values to device by calling v.to(device)"""
524 self.data = {k: v.to(device) for k, v in self.data.items()}
525 return self
526
527
528# class AddedToken(UserString):

Callers 15

trainFunction · 0.80
evaluateFunction · 0.80
mainFunction · 0.80
forwardMethod · 0.80
forwardMethod · 0.80
create_maskMethod · 0.80

Calls 1

itemsMethod · 0.80