MCPcopy Index your code
hub / github.com/SooLab/CGFormer / to

Method to

bert/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 11

validateFunction · 0.80
inferenceFunction · 0.80
invert_attention_maskMethod · 0.80
from_pretrainedMethod · 0.80
prune_linear_layerFunction · 0.80
prune_conv1d_layerFunction · 0.80
generateMethod · 0.80
_generate_beam_searchMethod · 0.80

Calls 1

itemsMethod · 0.80

Tested by

no test coverage detected