Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/deepspeedai/DeepSpeedExamples
/ map_to_torch_float
Function
map_to_torch_float
bing_bert/turing/dataset.py:71–74 ·
view source on GitHub ↗
(encoding)
Source
from the content-addressed store, hash-verified
69
70
71
def
map_to_torch_float(encoding):
72
encoding = torch.FloatTensor(encoding)
73
encoding.requires_grad_(False)
74
return
encoding
75
76
77
def
map_to_torch_half(encoding):
Callers
2
__getitem__
Method · 0.85
__getitem__
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected